[QFJ-838] Tests on jdk 1.7 failed Created: 15/Apr/15 Updated: 21/Apr/16 Resolved: 23/Dec/15 |
|
| Status: | Closed |
| Project: | QuickFIX/J |
| Component/s: | Engine |
| Affects Version/s: | 1.6.0 |
| Fix Version/s: | 1.6.2 |
| Type: | Bug | Priority: | Default |
| Reporter: | Slawomir Pawlewicz | Assignee: | Marcin L |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | session | ||
| Environment: |
jdk 1.7.0_45 on Win7 x64 |
||
| Issue Links: |
|
||||||||
| Description |
|
Tests passed on jdk 1.6. On jdk 1.7 they failed testAcceptorRelogon(quickfix.SessionTest) Time elapsed: 0.002 sec <<< FAILURE! testLogoutMsgSeqNumTooHighOrLow(quickfix.SessionTest) Time elapsed: 0.001 sec <<< FAILURE! |
| Comments |
| Comment by [ 11/Oct/15 ] |
|
I'm coming across the same issue. What I observe is that the Logout messages (and most other messages generated in SessionTest.java) are dropped on the floor due to issues with the UtcTimeStamp. Many tests call [[SystemTime.setTimeSource(systemTimeSource)]] where [[systemTimeSource]] has been set to [[new Date(1348264800000L);]]. Later tests will generate a message using [[createAdminMessage(2);]] or similar, which set the UtcTimeStamp as [[new Date();]]. These messages are never processed, because they cause [[<20120922-22:58:20, FIX.4.4:SENDER->TARGET, error> (Reject sent for Message 2: SendingTime accuracy problem)]] since the UtcTimeStamp is more that 120s different from SystemTime. I think the fix is to reset SystemTime to use the actual system clock after each test. |
| Comment by [ 11/Oct/15 ] |
|
Changing{ {@AfterClass public static void cleanup()}} to @After public void cleanup() fixes the problem by restoring the SystemTime after each unit test. |