Atomikos Forum

Unit tests on Windows

Hi, the Unit tests are failing when running on a Windows 7 box I have.  Just thought I'd let you know, because we definitely are running Atomikos on Windows application servers and if the unit tests aren't working, it doesn't instill too much confidence that the libraries will perform as they should under Windows.

Using the latest master from the github repo the two I've found so far are:

PooledAlarmTimerTestJUnit.java

I fixed this with the following change:

@@ -77,7 +77,7 @@ public class PooledAlarmTimerTestJUnit extends TestCase {
                });

                Thread.sleep(1050);
-              assertEquals(20, count1);
+              assertEquals(21, count1);
                assertEquals(10, count2);
        }

And

public/transactions/src/test/java/com/atomikos/persistence/imp/LogFileLockTestJUnit.java

For this one ^^^ if I simply change the order of the test methods in the file I can get it to work (re: taking the last test method and making it the first test method). IMHO the locking mechanism being employed simply can't be trusted on Windows. There must be some sort of extra step in releasing a lock that isn't being implemented.

On Ubuntu/trusty64 all the tests run just fine.

Craig.
Craig Tataryn Send private email
Friday, February 05, 2016
 
 
Hi,

Thanks for the feedback!

The timer test is an asynchronous test and is (like most of those) subject to race conditions and false negatives. I assume that is what you are seeing?

The second point is interesting - we'll have a look at that.

Thanks!
Guy
Guy Pardon Send private email
Monday, February 08, 2016
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics