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

Jean-Noël Rouvignac
03.41.2015 a11a0561f324860f1381a3b57212e20ede1ad05f
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
commita11a0561f324860f1381a3b57212e20ede1ad05f
tree 1b2fd459108dd79b80b40392246f99f08f16772b tree | zip | gz
parent e4c1b15c2f636d0ec0c9baf0d5190d5a80174eab 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-server-legacy/src/main/java/org/opends/server/controls/ExternalChangelogRequestControl.java 7 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/common/MultiDomainServerState.java 24 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java 16 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/replication/common/MultiDomainServerStateTest.java 43 ●●●● diff | view | raw | blame | history