RESOLVED - issue INT-1102: Add timestamp to JdbcMessageStore
This commit is contained in:
@@ -1,26 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java" />
|
||||
<classpathentry kind="src" path="src/main/resources" />
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java" />
|
||||
<classpathentry kind="src" path="src/test/resources" />
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.5.RELEASE/com.springsource.org.aspectj.weaver-1.6.5.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.5.RELEASE/com.springsource.org.aspectj.weaver-1.6.5.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-2.1.3.jar" sourcepath="/SI_IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-sources-2.1.3.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar" sourcepath="/SI_IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-sources-1.0.0.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/SI_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.aop/3.0.2.RELEASE/org.springframework.aop-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.aop/3.0.2.RELEASE/org.springframework.aop-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.asm/3.0.2.RELEASE/org.springframework.asm-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.asm/3.0.2.RELEASE/org.springframework.asm-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.beans/3.0.2.RELEASE/org.springframework.beans-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.beans/3.0.2.RELEASE/org.springframework.beans-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.context/3.0.2.RELEASE/org.springframework.context-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.context/3.0.2.RELEASE/org.springframework.context-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.2.RELEASE/org.springframework.context.support-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.2.RELEASE/org.springframework.context.support-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.core/3.0.2.RELEASE/org.springframework.core-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.core/3.0.2.RELEASE/org.springframework.core-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.expression/3.0.2.RELEASE/org.springframework.expression-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.expression/3.0.2.RELEASE/org.springframework.expression-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.2.RELEASE/org.springframework.transaction-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.2.RELEASE/org.springframework.transaction-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.springframework/org.springframework.test/3.0.2.RELEASE/org.springframework.test-3.0.2.RELEASE.jar" sourcepath="/SI_IVY_CACHE/org.springframework/org.springframework.test/3.0.2.RELEASE/org.springframework.test-sources-3.0.2.RELEASE.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.mockito/com.springsource.org.mockito/1.8.0/com.springsource.org.mockito-1.8.0.jar" sourcepath="/SI_IVY_CACHE/org.mockito/com.springsource.org.mockito/1.8.0/com.springsource.org.mockito-sources-1.8.0.jar" />
|
||||
<classpathentry kind="var" path="SI_IVY_CACHE/org.objenesis/com.springsource.org.objenesis/1.0.0/com.springsource.org.objenesis-1.0.0.jar" sourcepath="/SI_IVY_CACHE/org.objenesis/com.springsource.org.objenesis/1.0.0/com.springsource.org.objenesis-sources-1.0.0.jar" />
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.integration" />
|
||||
<classpathentry kind="output" path="target/classes" />
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.springframework.integration.test</name>
|
||||
<name>spring-integration-test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
@@ -15,8 +15,14 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.maven.ide.eclipse.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.maven.ide.eclipse.maven2Nature</nature>
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessageHeaders;
|
||||
|
||||
/**
|
||||
* Matcher to make assertions about message equality easier. Usage:
|
||||
* Matcher to make assertions about message equality easier. Usage:
|
||||
*
|
||||
* <pre>
|
||||
* @Test
|
||||
@@ -29,21 +29,25 @@ import org.springframework.integration.core.MessageHeaders;
|
||||
* return new PayloadAndHeaderMatcher(expected);
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class PayloadAndHeaderMatcher extends BaseMatcher<Message<?>> {
|
||||
|
||||
private final Object payload;
|
||||
|
||||
private final Map<String, Object> headers;
|
||||
|
||||
private final String[] ignoreKeys;
|
||||
|
||||
@Factory
|
||||
public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> expected) {
|
||||
return new PayloadAndHeaderMatcher(expected);
|
||||
public static Matcher<Message<?>> sameExceptIgnorableHeaders(Message<?> expected, String... ignoreKeys) {
|
||||
return new PayloadAndHeaderMatcher(expected, ignoreKeys);
|
||||
}
|
||||
|
||||
private PayloadAndHeaderMatcher(Message<?> expected) {
|
||||
private PayloadAndHeaderMatcher(Message<?> expected, String... ignoreKeys) {
|
||||
this.ignoreKeys = ignoreKeys;
|
||||
this.payload = expected.getPayload();
|
||||
this.headers = getHeaders(expected);
|
||||
}
|
||||
@@ -52,6 +56,9 @@ public class PayloadAndHeaderMatcher extends BaseMatcher<Message<?>> {
|
||||
HashMap<String, Object> headers = new HashMap<String, Object>(operand.getHeaders());
|
||||
headers.remove(MessageHeaders.ID);
|
||||
headers.remove(MessageHeaders.TIMESTAMP);
|
||||
for (String key : ignoreKeys) {
|
||||
headers.remove(key);
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
@@ -62,7 +69,8 @@ public class PayloadAndHeaderMatcher extends BaseMatcher<Message<?>> {
|
||||
}
|
||||
|
||||
public void describeTo(Description description) {
|
||||
description.appendText("a Message with Headers that match except ID and timestamp for payload: ").appendValue(payload).appendText(" and headers: ").appendValue(headers);
|
||||
description.appendText("a Message with Headers that match except ID and timestamp for payload: ").appendValue(
|
||||
payload).appendText(" and headers: ").appendValue(headers);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user