camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Raible <m...@raibledesigns.com>
Subject Re: [VOTE] Release Apache Camel 2.14.0 (the second try)
Date Wed, 17 Sep 2014 05:23:45 GMT
Willem.Jiang wrote
> No, as the CI build was broken for a while, the latest Camel 2.14-SNAPSHOT
> was built about 2 month ago.
> You can try to run some tests with Camel 2.14.0-SNAPSHOT for verification.
> 
> On September 16, 2014 at 11:05:55 PM, Matt Raible (

> matt@

> ) wrote:
>> Should everything be the same as Camel 2.14-SNAPSHOT? I've been using the
>> SNAPSHOT release for months and haven't had any issues. However, when I
>> switch to 2.14.0, I get a couple test failures.
>>  
>> For example, here's one of them:
>>  
>> @Test
>> public void lookupByMemberId() throws Exception {
>> finalResult.expectedMessageCount(1);
>> finalResult.allMessages().body().isInstanceOf(MemberResponse.class);
>>  
>> finalResult.allMessages().body().convertToString().contains("firstName='JOHN',  
>> lastName='SMITH'");
>>  
>> MemberLookup request = new MemberLookup();
>> request.setClient("FOO");
>> request.setMemberId("12456789325");
>>  
>> lookup.sendBody(request);
>>  
>> finalResult.assertIsSatisfied();
>> }
>>  
>> The error:
>>  
>> lookupByMemberId:147 Assertion error at index 0 on mock
>> mock://finalResult
>> with predicate: body contains firstName='JOHN', lastName='SMITH'
>> evaluated
>> as: MemberResponse{member=Member{memberId='null', pid='null',
>> address1='null', address2='null', city='null', county='null',
>> dateOfBirth='null', eligible='null', faxNumber='null', firstName='John',
>> lastName='Smith', gender='null', patientLanguage='English',
>> phoneNumber='PHONE', zip='null', memberEligibility=null}} contains
>> firstName='JOHN', lastName='SMITH' on Exchange[Message:
>> MemberResponse{member=Member{memberId='null', pid='null',
>> address1='null',  
>> address2='null', city='null', county='null', dateOfBirth='null',
>> eligible='null', faxNumber='null', firstName='John', lastName='Smith',
>> gender='null', patientLanguage='English', phoneNumber='PHONE',
>> zip='null',  
>> memberEligibility=null}}]
>>  
>> If I switch back to 2.14-SNAPSHOT, the test passes.
>>  
>> Thanks,
>>  
>> Matt
>>  

You are correct, using 2.14.0-SNAPSHOT also causes my tests to fail. It
seems things became case-sensitive or my weaveBy's are working better than
before. Here's my adviceWith:

lookupRoute.adviceWith(context, new AdviceWithRouteBuilder() {
	@Override
	public void configure() throws Exception {
		// mock the final member lookup
		weaveById("addedMemberLookup").replace().process(new Processor() {
			@Override
			public void process(Exchange exchange) throws Exception {
				List<Map> data = new ArrayList<>();
				Map<String, String> map = new HashMap<>();
				map.put("FIRST_NAME", "Ben");
				map.put("LAST_NAME", "Smith");
				data.add(0, map);
				exchange.getOut().setBody(data);
			}
		});
	}
});

And this was working in 2.14-SNAPSHOT:

result.allMessages().body().convertToString().contains("firstName='BEN',
lastName='SMITH'");

However, in 2.14.0, I needed to change it to the following:

result.allMessages().body().convertToString().contains("firstName='Ben',
lastName='Smith'");

Using this new, case-sensitive, assertion and using 2.14-SNAPSHOT passes as
well. Strange.

Thanks for your advice. I appreciate your time.

+1 (non-binding) for this release.

Matt




--
View this message in context: http://camel.465427.n5.nabble.com/VOTE-Release-Apache-Camel-2-14-0-the-second-try-tp5756536p5756625.html
Sent from the Camel Development mailing list archive at Nabble.com.

Mime
View raw message