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

neil_a_wilson
28.43.2007 73dd9bc58413442f19cdff6a450b1a1ae167c270
refs
author neil_a_wilson <neil_a_wilson@localhost>
Tuesday, August 28, 2007 23:43 +0200
committer neil_a_wilson <neil_a_wilson@localhost>
Tuesday, August 28, 2007 23:43 +0200
commit73dd9bc58413442f19cdff6a450b1a1ae167c270
tree 692940579e74fd00641d5ebd81eb93ff7c175b47 tree | zip | gz
parent 722aa64b94ff2f95004c7ddc4395683ca01cf256 view | diff
Update the TestCaseUtils.clearJEBackend() method to use a different approach.
Instead of closing the environment, deleting the files, and re-opening the
environment, we are keeping the environment open and just truncating the
databases. This dramatically reduces the amount of memory required to run the
unit tests, apparently as a result of a memory leak in the Berkeley DB JE when
the environment is repeatedly opened and closed.

Note that the latest release of Berkeley DB JE (3.2.44, which we aren't yet
using) claims to have a fix for a similar problem (JE issue #15444 as described
in http://forums.oracle.com/forums/thread.jspa?messageID=1782659) but testing
with that JE version didn't appear to resolve the problem so it is likely that
the issue still exists. However, while it was causing a significant problem in
our test cases, it is unlikely to cause problems in production environments
because the JE environment should not be repeatedly opened and closed in the
same JVM instance.
2 files modified
40 ■■■■■ changed files
opends/src/server/org/opends/server/backends/jeb/RootContainer.java 9 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java 31 ●●●● diff | view | raw | blame | history