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

Matthew Swift
25.01.2015 760da8c6ac8020e0abc97ab85ad99034d5a87767
refs
author Matthew Swift <matthew.swift@forgerock.com>
Wednesday, November 25, 2015 00:01 +0100
committer Matthew Swift <matthew.swift@forgerock.com>
Wednesday, November 25, 2015 00:01 +0100
commit760da8c6ac8020e0abc97ab85ad99034d5a87767
tree 4ad939cc547c9a8b1f8dcf83fd1999cea30a6639 tree | zip | gz
parent 072621ac4988d167058cb7353449d7146c65731c view | diff
OPENDJ-2460: fix pluggable backend unit tests

This was evil. TestNG has a bug which prevents method dependencies from
working with inheritance. When looking to see if another test method has
already completed it sometimes looks in the wrong sub-class instance,
when it should look in the current sub-class instance

I tried to refactor the JE/PDB tests to use @Factory for creating test
instances (one for PDB one for JE), but both instances end up being
invoked in parallel. In order to preserve the ordering I tried using the
"priority" @Test attribute, but it did not work.

I reordered the test methods and ran them sequentially, but TestNG
ignores the declaration order and just runs them in alphabetical order.
Finally, I refactored the tests so that they have no side-effects and
can be run in any order, which was probably the right thing to do
anyway.
3 files modified
353 ■■■■■ changed files
opendj-server-legacy/src/test/java/org/opends/server/backends/jeb/JETestCase.java 3 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java 347 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/pdb/PDBTestCase.java 3 ●●●● diff | view | raw | blame | history