Commit Graph

107 Commits

Author SHA1 Message Date
Artem Bilan
7a5c9438e3 INT-3836: Upgrade to spring-social-twitter-1.1.1
JIRA: https://jira.spring.io/browse/INT-3836

Nothing changed from the module perspective - only tests to apply a new API.
2015-09-28 18:46:42 -04:00
Artem Bilan
faf104e608 INT-3394: Use Jedis Client in Tests
JIRA: https://jira.spring.io/browse/INT-3394

INT-3394: Restore `awaitContainerSubscribed`
2014-05-12 10:20:33 -04:00
Artem Bilan
97d1d389a9 INT-3065: Add tweet-data-expression for Update
JIRA: https://jira.spring.io/browse/INT-3065

Improve `TwitterSearchOutboundGateway` to use an expression
to build the tweet instead of just using the payload (which
remains the default).
2014-04-24 14:29:55 -04:00
Gary Russell
7082b9e4cb INT-1939 Twitter Search Outbound Gateway
JIRA: https://jira.spring.io/browse/INT-1939

Outbound gateway to allow on-demand variable searches.

Also add the `page-size` attribute to inbound adapters (previously
hard-coded to 20).

Also the inbound adapters now `require` a `TwitterTemplate` because even
search requires authentication.

Polishing - PR Comments

- Bump to spring-social-twitter 1.0.0.RC1
- Remove `requires-reply`
- Polishing
- Add integration test

INT-1939 Doc and Rework

Now supports up to 4 search args (as well as a
SearchParameters).

INT-1939: Polishing
2014-04-11 16:13:07 +03:00
Gary Russell
9dee131e3c INT-3349 BeanFactory Propagation
JIRA: https://jira.spring.io/browse/INT-3349

Several FactoryBeans did not propagate the BeanFactory
to their created object(s). Beans that create messages
must have access to a bean factory to get the
message builder factory.

Fix the FactoryBeans and add a mock FB to all tests that
need one.

Add a runtime environment variable to make any infractions
fatal. This should be set to `true` on CI builds and on
framework developer environments.
2014-04-02 14:15:48 -04:00
Gunnar Hillert
00a4bc8cc7 INT-3307 Twitter: Upgrade Spring Social Twitter to 1.1.0
Jira: https://jira.springsource.org/browse/INT-3307
2014-02-25 10:44:36 +02:00
Gary Russell
48a005ec2a Use SI BeanFactoryChannelResolver
Resolve channel names in the HeaderChannelRegistry.

Add back MessagingTemplate (subclass of GenericMessagingTemplate).
2013-11-25 18:43:16 -05:00
Gary Russell
9146a374c1 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/MessageHeaders.java
	spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationContextUtils.java
	spring-integration-core/src/main/java/org/springframework/integration/json/JsonToObjectTransformer.java
	spring-integration-core/src/main/java/org/springframework/integration/mapping/AbstractHeaderMapper.java
	spring-integration-core/src/main/java/org/springframework/integration/metadata/package-info.java
	spring-integration-feed/src/test/java/org/springframework/integration/feed/inbound/FeedEntryMessageSourceTests.java
	spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapter.java
	spring-integration-redis/src/main/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandler.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpointTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisQueueOutboundChannelAdapterTests.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MockitoMessageMatchers.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/PayloadMatcher.java
	spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceTests.java
	spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceWithRedisTests.java

Resolved.
2013-11-05 14:30:50 -05:00
Artem Bilan
5be8ef3fd8 INT-3147: (3167,3173,1941) Improve MetadataStore
Previously, `MetadataStore` couldn't be configured for Twitter Adapters
- only a global one could be used.
The `metadataKey` was generated automatically with a 'difficult' value.

* Register all `MessageSource` for `SourcePollingChannelAdapter`
as beans with id based on adapter id and prefix '.source' (INT-3147)
* Polishing parser to get rid of explicit `MessageSource` beans. (INT-3147)
* Make Feed and Twitter adapters `id` attribute as required -
now it presents a `metadataKey` for `MetadataStore` (INT-3147)
* Add to Twitter adapters a reference attribute for `MetadataStore` (INT-3173)
* Add Twitter adapters `poll-skip-period` attribute (INT-3167)
* Add and implement `MetadataStore#remove` (INT-1941)
* Make `MetadataStore` as `@ManagedResource` (INT-1941)
* Polishing tests

JIRAs:
https://jira.springsource.org/browse/INT-3147
https://jira.springsource.org/browse/INT-3167
https://jira.springsource.org/browse/INT-3173
https://jira.springsource.org/browse/INT-1941

INT-3147: Polishing and fixes

* add domain suffix to `metadataKey`
* change contract of `MetadataStore.remove`
* remove timeout window from `AbstractTwitterMessageSource`
* polishing and fix `SearchReceivingMessageSourceWithRedisTests`

INT-3147: Rebasing and polishing

INT-3147: fix 'metadata' package tangle

INT-3147 Doc Polishing
2013-11-04 12:44:12 -05:00
Gary Russell
7dcd2b5fe9 Remove SI GenericMessage
- Deprecate for now to ease XD migration.
2013-10-24 09:46:30 -04:00
Gary Russell
71f3fb1cf6 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/aggregator/AggregatorTests.java
	spring-integration-core/src/test/java/org/springframework/integration/aggregator/ConcurrentAggregatorTests.java
	spring-integration-core/src/test/java/org/springframework/integration/aggregator/CorrelatingMessageHandlerTests.java
	spring-integration-core/src/test/java/org/springframework/integration/gateway/GatewayInterfaceTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java

Resolved
2013-10-24 09:18:00 -04:00
Artem Bilan
9367928fd7 INT-3113: Use Lettuce Redis Client
* Ensure close connections after tests
* Remove `Thread.sleep` where it is possible

JIRA: https://jira.springsource.org/browse/INT-3113

INT-3113: Improve `RedisAvailableRule`

* Upgrade to Spring-Data-Redis-1.1.0
* Change Redis port to default one - 6379

Polish - add smart delay to SubscribableRedisChannelTests.pubSubChannelTest
2013-10-23 17:39:15 -04:00
Andy Wilkinson
28ab8394de Build on top of Spring 4's new messaging types
This commit updates Spring Integration to depend upon Spring 4, making
use of the message types that have moved from Spring Integration into
Spring's new spring-messaging module.

The default message converter no longer supports conversion of a
message that is null, throwing an IllegalArgumentException if an
attempt is made to convert null. Furthermore, GenericMessagingTemplate
does not support sending null, again throwing an
IllegalArgumentException. Previously, MessagingTemplate had no-oped an
attempt to send null.

ConcurrentAggregatorTests and AggregatorTests both had a single test
that was specifically testing the behaviour of an aggregator that
returns null for its message. These tests have been removed.

CorrelatingMessageHandlerTests have been updated to specify some
additional behaviour for its mocks so that null messages are not
returned.

These are the only functional changes that have been made. All other
changes are simply for moving to the repackaged and/or renamed types.

In the move to being part of core Spring, a number of constants and
header accessor methods have moved from MessageHeaders to
MessageHeaderAccessor. This commit continues this pattern for
the enterprise integration headers that are specific to Spring
Integration. A new class, EiMessageHeaderAccessor, has been created.
This class provides constants and methods for working with SI-specific
headers. The main code and tests have been updated to use this new
class.
2013-10-08 16:42:22 -04:00
Gunnar Hillert
1fa9b92c0b INT-3085 Add a Redis-backed MetadataStore
* Add tests
* Add documentation

INT-3085 Code review changes

INT-3085 Add Twitter Integration Test

JIRA: https://jira.springsource.org/browse/INT-3085
2013-10-04 11:04:59 +03:00
Craig Walls
56f9581b85 Update Spring Social Twitter version to 1.0.4
(Refactor) Use SearchParameters for searching Twitter
2013-06-07 18:17:35 -04:00
Gary Russell
00cb16ec21 INT-2996 Fix Class and Package Cycles
INT-2996 Fix Package Cycle

Move interface ...store.MetadataStore to ...store.metadata.

INT-2996 Fix Class Tangle

TcpConnectionEvent incorrectly referenced the
concrete TcpConnectionSupport instead of TcpConnection.
2013-04-16 19:10:48 -04:00
Gunnar Hillert
0271acaf4c INT-2916 - Upgrade to JUnit 4.11 in support of JDK7
For reference see: https://jira.springsource.org/browse/INT-2916

Changes:

* INT-2919 - Upgrade Spring Data Gemfire to 1.2.2.RELEASE
* Exclude Hamcrest transitive dependency from JUnit (as already explicitly declared)
* Set sourceCompatibility in build.gradle to 1.6
* Set targetCompatibility in build.gradle to 1.6
* Upgrade Hamcrest to 1.3 and fix deprications
  - Corematcher is(*class) change to is(instanceOf(*class))
  - Change org.junit.internal.matchers.TypeSafeMatcher to org.hamcrest.TypeSafeMatcher
  - Change import org.junit.matchers.JUnitMatchers.containsString to org.hamcrest.CoreMatchers.containsString
  - Change import org.junit.matchers.JUnitMatchers.both to org.hamcrest.CoreMatchers.both
  - Change import org.junit.matchers.JUnitMatchers.containsString to org.hamcrest.CoreMatchers.containsString
* Fix JUnit deprecations
  - changed junit.framework.Assert to org.junit.Assert
* Add few missing licenses headers to tests
* Marked several test classes with: @DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
  - SplitterIntegrationTests
  - GatewayInvokingMessageHandlerTests
  - FileToChannelIntegrationTests
  - FileInboundChannelAdapterWithRecursiveDirectoryTests
  - JdbcMessageStoreChannelTests
  - ChatMessageInboundChannelAdapterParserTests
* 3 Tests ignored (Still needs to be addressed):
  - testOperationOnPrototypeBean
  - testFailOperationWithCustomScope
  - testOperationOfControlBus
* Update SQL script (test-failure):
  - spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/outboundSchema.sql
  - add drop table statements
  - add ignore-failures="DROPS" to "jdbcOutboundChannelAdapterCommonConfig.xml"

INT-2916 - Code Review Changes

INT-2916 - Fix ignored Tests

Fix 3 previously ignored tests in *GroovyControlBusTests*:

* testOperationOnPrototypeBean
* testFailOperationWithCustomScope
* testOperationOfControlBus

INT-2916 - CI Build Testing

INT-2963 - Remove JDK7 Compilation Warnings

* Upgrade Mockito to 1.9.5
* Fix failing SubscribableJmsChannelTests

INT-2916 - Standardize Hamcrest assertions
Ensure Hamcrest assertions are standardized to: is(instanceOf(...))
2013-04-04 13:40:46 -04:00
michaljemala
1eb1301b1f INT-2801 Twitter: Fix Init. of Metadata Key
Key was not initialized unless authorized.
2012-11-08 15:10:25 -05:00
Artem Bilan
31d0e42c1a INT-2718 & INT-2721: fixes for <chain> & fix bugs
* ban to use 'channel' and 'request-channel' attributes for 'outbound-channel-adapters' and 'outbound-gateways' when they are declared inside the `<chain>`
* fix usage of `<request-handler-advice-chain>` for components when they are declared inside the `<chain>`
* ban to use `<request-handler-advice-chain>` for 'outbound-channel-adapters' when they are declared inside the `<chain>` don't implement `AbstractReplyProducingMessageHandler`
* refactor `IntegrationNamespaceUtils` to use `BeanDefinition` instead of `BeanDefinitionBuilder` for 'advice-chain' parsing
* tests for new logic for 'channel' and 'request-channel' attributes within `<chain>`
* tests for new logic for `<request-handler-advice-chain>` within `<chain>`
* fix failed test on slow machine
* fix `SysLogTransformer` tests

For reference:
https://jira.springsource.org/browse/INT-2718
https://jira.springsource.org/browse/INT-2721
https://jira.springsource.org/browse/INT-2719

INT-2718 Polishing
2012-09-10 16:13:45 -04:00
Gary Russell
08cbab08c2 INT-2214, INT-343, INT-2250 MessageHandler Advice
Add general capability to advise just the handleRequestMessage
part of an AbstractReplyProducingMessageHandler.

This is to advise just the immediate operation, and not the
entire downstream flow.

Uses include:

* outbound gateway post processing
* adding retry behavior using spring-retry
* adding circuit breaker functionality

Initial commit for review.

Also need to advise simple message handlers (such as file
etc) to allow them to post-process file operations
with payload.delete(), payload.renameTo(...) etc.

INT-2250 Add Circuit Breaker Advice

INT-343 Add Retry Advice

Stateless and Stateful retry using spring-retry. Stateless
means the RetryTemplate performs the retries internally.
Stateful means the exception is thrown (e.g. to JMS container)
and the retry state is maintained by spring-retry.

INT-2215, INT-343, INT-2250 Refactoring

Factor out common abstract Advice class.

INT-2214 Catch Evaluation Expression Exceptions

If an onSuccess expression evaluation fails, add an
option so the user can decide whether such an exception is
caught, or propagated to the caller.

INT-2214 etc PR Review Polishing

INT-2214 etc Namespace Core, File, FTP

Add <request-handler-advice-chain/> to outbound endpoints.

INT-2214 etc. More Namespace Support

amqp, event, gemfire, groovy, http, ip, jdbc, jms, jmx, jpa, mail, rmi, sftp, twitter, ws, xmpp

INT-2214 etc Polishing

PR Review

INT-2214 etc Polishing

Don't catch Throwable.

Move Advice classes to handler.advice package.
2012-08-06 09:15:58 -04:00
Artem Bilan
45c429ee2b INT-2275: any outbound-channel-adapter in <chain>
Add re-init logic for nested chains
Add logic about nested element for AbstractChannelAdapterParser
Refactor of DefaultOutboundChannelAdapterParser
Test for non-last nested chain with some outbound-channel-adapter
Improve XSD for chain-type
Manual outbound-channel-adapter ability for chain
Integration tests for all outbound-channel-adapter within <chain>
Remove redundant 'return-value-required' attribute from <stored-proc-outbound-channel-adapter>
Add support 'expectReply' for FileWritingMessageHandler

INT-2275 polishing & refactor FileOutbound*Parser

HttpRequestExecutingMessageHandlerTests polishing

INT-2275: polishing JavaDoc
2012-05-14 12:41:39 -04:00
Gunnar Hillert
d0b08474fd INT-2446 - Twitter: Allow unauthorized operations
* also improve test code coverage
2012-03-30 09:49:23 -04:00
Mark Fisher
9e778035aa versionless schemas for test and twitter modules 2011-10-10 13:56:40 -04:00
Oleg Zhurakousky
e5ce83329f migrated Twitter support to use Spring Social 2011-09-15 13:35:52 -04:00
Oleg Zhurakousky
b3c427ed0c INT-1902 polished Twitter upgrade to make sure it is still backward compatible, also upgraded to the latest version 2.1.12 2011-05-11 18:26:10 -04:00
Oleg Zhurakousky
3f91ba3064 INT-1902 upgraded Twitter to use Twitter4J-2.1.10 2011-05-11 17:27:40 -04:00
Gary Russell
5f180de201 INT-1848 Add order Attribute (twitter) 2011-04-30 11:06:24 -04:00
Mark Fisher
0be6410a6d INT-1636 rolling back the DM target user expression support 2010-12-16 18:45:12 -05:00
Mark Fisher
fd7dbdd890 now evaluating SpEL against context variables in Twitter Direct Message test 2010-12-16 17:05:31 -05:00
Oleg Zhurakousky
2a456d9373 INT-1636 added 'target-user-expression' to the Twitter DM adapter 2010-12-10 16:00:13 -05:00
Chris Beams
8fcd2bc858 Add noop test to avoid Maven surefire failure 2010-11-26 11:26:24 -07:00
Mark Fisher
f7bb5bdd9d removed warning in test 2010-11-22 01:36:29 -05:00
Mark Fisher
e9d21bfff3 removed unused imports in test 2010-11-21 19:39:21 -05:00
Oleg Zhurakousky
c57a0067cb Twitter test polishing 2010-11-19 03:49:13 -05:00
Mark Fisher
8759d79e22 removed unused 'in-reply-to' Twitter header 2010-11-18 22:01:28 -05:00
Mark Fisher
382e074f59 AbstractTwitterMessageSource no longer implements Lifecycle (no longer extends AbstractEndpoint). @Ignore-d irrelevant tests, and removed the RateLimitStatusTrigger. 2010-11-18 19:44:48 -05:00
Oleg Zhurakousky
f549ccbdd9 fixing broken Twitter tests 2010-11-18 14:35:44 -05:00
Oleg Zhurakousky
2d9af9b849 polishing Twitter 2010-11-18 14:11:37 -05:00
Mark Fisher
f5c17d003b aligned test name with class under test 2010-11-15 17:59:33 -05:00
Mark Fisher
3423ca2dd7 renamed test to match class under test 2010-11-13 12:39:52 -05:00
Oleg Zhurakousky
24521e97b9 minor polishing of Twitter before polishing the Twitter docs 2010-11-12 11:22:09 -05:00
Chris Beams
5a39dd1d24 Fix minor compiler warnings 2010-11-11 17:11:40 -08:00
Chris Beams
bd5a3d190b Merge branch 'buildSrc'
Added 'buildSrc' directory as a git submodule to be shared across
all Spring open-source projects. This eliminates the need to maintain
custom Gradle code within Spring Integration directly.

For a brief introduction to git submodules, see
    http://speirs.org/blog/2009/5/11/understanding-git-submodules.html

And of course the official documentation is at
    http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html
    https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial

Conflicts:
	spring-integration-twitter/src/main/java/org/springframework/integration/twitter/core/Twitter4jTemplate.java
	spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceTests.java
2010-11-11 16:26:53 -08:00
Mark Fisher
ae619d95bf INT-1604 removed OutboundTweetMessageMapper and AbstractOutboundTwitterEndpointSupport, renamed TimelineSendingMessageHandler to StatusUpdatingMessageHandler 2010-11-11 18:54:20 -05:00
Mark Fisher
373884d40d INT-1604 renamed TimelineUpdateReceivingMessageSourceTests (removed 'Update') 2010-11-11 17:56:47 -05:00
Mark Fisher
b5f57e3ddc INT-1604 encapsulation 2010-11-11 17:50:33 -05:00
Mark Fisher
4f3b887ddd INT-1604 encapsulation 2010-11-11 17:44:48 -05:00
Oleg Zhurakousky
d0ebcd9e6f INT-1603 removed MH prost processor from AMS 2010-11-11 16:39:08 -05:00
Oleg Zhurakousky
d1a97304a9 INT-1603 added real test in the 'ignored' for search with namespace 2010-11-11 16:11:57 -05:00
Oleg Zhurakousky
ff0d81e36b INT-1603 added namespace support for SearchInboundMessageSource 2010-11-11 15:58:07 -05:00