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

neil_a_wilson
28.43.2007 a13fff43945f15022f9d96e0d2de2e572d6c81cf
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
commita13fff43945f15022f9d96e0d2de2e572d6c81cf
tree 05c65a1b4bc0bae0c3000cdc2329d9fd6eb71c33 tree | zip | gz
parent 2671b8c093dde6934c2b261830e3d1b6133e8dc4 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
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java 9 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java 31 ●●●● diff | view | raw | blame | history