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

Jean-Noël Rouvignac
03.41.2015 09e8e68aaa116a16aaf1a93e9531df770c281a96
refs
author Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, September 3, 2015 11:41 +0200
committer Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, September 3, 2015 16:06 +0200
commit09e8e68aaa116a16aaf1a93e9531df770c281a96
tree 2e42114e4b733caf05c94d8c7346672317de4820 tree | zip | gz
parent 9c8607c98788bddfd846a2fe7323b03bef47f3bf view | diff
Fix randomness in ChangelogBackendTestCase

ChangelogBackendTestCase.java:
In searchChangelog(), move the assert on the SearchOperation ResultCode inside the loop that asserts the number of returned search entries.

ExternalChangelogRequestControl.java:
In getCookie(), copied the cookie using new MultiDomainServerState constructor. This prevents unit tests from mutating the cookie coming from the control and making repeated calls with the same SearchRequest fail.

MultiDomainServerState.java, MultiDomainServerStateTest.java:
Added copy constructor + tests
4 files modified
90 ■■■■ changed files
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/controls/ExternalChangelogRequestControl.java 7 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/replication/common/MultiDomainServerState.java 24 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java 16 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/test/java/org/opends/server/replication/common/MultiDomainServerStateTest.java 43 ●●●● diff | view | raw | blame | history