mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
16.22.2014 e5e4ea1dfa436ac42413a4d9b3b1279354b7cc3b
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, May 16, 2014 10:22 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, May 16, 2014 10:22 +0200
commite5e4ea1dfa436ac42413a4d9b3b1279354b7cc3b
tree e97d940af2caa0c50ffe4340f3b5a92b2dea6629 tree | zip | gz
parent ba18f9c0f06137b8fa1fef7aca25e4cb8f97054b view | diff
Fixing JEChangeNumberIndexDBTest random tests.
JE was throwing exception when the thread accessing it had been interrupted which happens frequently on single core machines.
The solution is to replace the use of Thread.sleep(long) + Thread.interrupt() with Object.wait(long) + Object.notify() on thread shutdown.



JEChangelogDB.java:
Replaces the use of Thread.sleep(long) + Thread.interrupt() with Object.wait(long) + Object.notify() on thread shutdown.
Created method jeFriendlySleep(long) to emulate Thread.sleep(long).

ReplicationServer.java:
Code cleanup.
Changed shutdown field from boolean to AtomicBoolean.
Added final keyword to fields.
Reduced visibility of waitConnections() from public to default.
In shutdown(), used StaticUtils.close().
2 files modified
159 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 106 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 53 ●●●● diff | view | raw | blame | history