Hi,

I just found an interesting thing. When I run mvn clean install with the trunk code on windows box, I got the FileRenameRouteTest failed. But when I ran it on Linux or ran the test separately in eclipse , the FileRenameRouteTest was passed .

So I digged out the codes. I found the new added asyncProcessor in FileConsumer will not call the processStrategy.commit method in the whole unit test. That is AsyncCallback never be called in the FileRouteTest.

When I changed the AsyncProcessorTypeConverter's process method like the below codes,
the FileConsumer's AsyncCallback was called.

public boolean process(Exchange exchange, AsyncCallback callback) {
           try {
               processor.process(exchange);
           } catch (Throwable e) {
               exchange.setException(e);
           }
// false means processing of the exchange asynchronously, the original code used true parameter
           callback.done(false);
           return true;
       }
And for the FileRenameRouteTest , my suggestion is set the surefire plugin's forkMode to be pertest. I just tested it on windows.
<plugin>
       <artifactId>maven-surefire-plugin</artifactId>
       <configuration>
         <forkMode>pertest</forkMode>
         .....

Willem.

Reply via email to