diff options
author | mi <mi@FreeBSD.org> | 2006-11-23 14:21:16 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2006-11-23 14:21:16 +0800 |
commit | 769eb65b2c4a1d396b775cb4d5b524afb367d801 (patch) | |
tree | a0593f0f89a824c7c95511c634b84ee140ae665d | |
parent | f1dfac1fd3c018b96a0c674f1dda3d6a4ebb356c (diff) | |
download | freebsd-ports-graphics-769eb65b2c4a1d396b775cb4d5b524afb367d801.tar.gz freebsd-ports-graphics-769eb65b2c4a1d396b775cb4d5b524afb367d801.tar.zst freebsd-ports-graphics-769eb65b2c4a1d396b775cb4d5b524afb367d801.zip |
Unbreak by adding another patch from the vendor.
-rw-r--r-- | java/berkeley-db/Makefile | 5 | ||||
-rw-r--r-- | java/berkeley-db/files/patch-test-failure | 136 |
2 files changed, 137 insertions, 4 deletions
diff --git a/java/berkeley-db/Makefile b/java/berkeley-db/Makefile index 075e3df01bf..a59a70229af 100644 --- a/java/berkeley-db/Makefile +++ b/java/berkeley-db/Makefile @@ -19,8 +19,6 @@ OPTIONS= TEST "Run the self-tests after building automatically" on BUILD_DEPENDS= ${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit -BROKEN= Self-tests fail - USE_JAVA= yes JAVA_VERSION= 1.5+ USE_ANT= yes @@ -52,7 +50,8 @@ test: post-build: test # # Please, review the reported failures (if any) and consider - # reporting them to the developers at support@sleepycat.com + # reporting them to the developers via: + # http://forums.oracle.com/forums/forum.jspa?forumID=273 # You can re-run the tests without rebuilding the port by # simply doing `make test' # diff --git a/java/berkeley-db/files/patch-test-failure b/java/berkeley-db/files/patch-test-failure index 468c02c1edd..b700a7edef5 100644 --- a/java/berkeley-db/files/patch-test-failure +++ b/java/berkeley-db/files/patch-test-failure @@ -1,8 +1,8 @@ This are temporary work-arounds for spurious test failures. See the discussions at http://forums.oracle.com/forums/thread.jspa?threadID=431242 -and http://forums.oracle.com/forums/thread.jspa?threadID=431549 + http://forums.oracle.com/forums/thread.jspa?threadID=446837 The last one appears somewhat scary, but SleepyCat/Oracle's support assures me, the problem can be ignored as it has to do with the test framework and not the software itself. @@ -34,3 +34,137 @@ can be ignored as it has to do with the test framework and not the software itse + public void meowCleaning2000() throws Throwable { +Index: test/com/sleepycat/je/cleaner/ReadOnlyLockingTest.java +=================================================================== +diff -c -r1.7 ReadOnlyLockingTest.java +*** test/com/sleepycat/je/cleaner/ReadOnlyLockingTest.java 12 Sep 2006 19:17:14 -0000 1.7 +--- test/com/sleepycat/je/cleaner/ReadOnlyLockingTest.java 23 Nov 2006 00:07:40 -0000 +*************** +*** 36,41 **** +--- 35,41 ---- + public class ReadOnlyLockingTest extends TestCase { + + private static final int FILE_SIZE = 4096; ++ private static final int READER_STARTUP_SECS = 30; + + private static final CheckpointConfig forceConfig = new CheckpointConfig(); + static { +*************** +*** 48,53 **** +--- 48,72 ---- + private Database db; + private Process readerProcess; + ++ private static File getProcessFile() { ++ return new File(System.getProperty(TestUtils.DEST_DIR), ++ "ReadOnlyProcessFile"); ++ } ++ ++ private static void deleteProcessFile() { ++ File file = getProcessFile(); ++ file.delete(); ++ TestCase.assertTrue(!file.exists()); ++ } ++ ++ static void createProcessFile() ++ throws IOException { ++ ++ File file = getProcessFile(); ++ TestCase.assertTrue(file.createNewFile()); ++ TestCase.assertTrue(file.exists()); ++ } ++ + public ReadOnlyLockingTest() { + envHome = new File(System.getProperty(TestUtils.DEST_DIR)); + } +*************** +*** 55,60 **** +--- 74,81 ---- + public void setUp() + throws IOException, DatabaseException { + ++ deleteProcessFile(); ++ + TestUtils.removeLogFiles("Setup", envHome, false); + TestUtils.removeFiles("Setup", envHome, FileManager.DEL_SUFFIX); + } +*************** +*** 62,67 **** +--- 83,90 ---- + public void tearDown() + throws IOException, DatabaseException { + ++ deleteProcessFile(); ++ + try { + stopReaderProcess(); + } catch (Throwable e) { +*************** +*** 219,228 **** + ReadOnlyProcess.class.getName(), + }; + +! /* Start it and give it a chance to open the environment. */ + readerProcess = Runtime.getRuntime().exec(cmd); +! Thread.sleep(2000); + //printReaderStatus(); + } + + private void stopReaderProcess() +--- 242,264 ---- + ReadOnlyProcess.class.getName(), + }; + +! /* Start it and wait for it to open the environment. */ + readerProcess = Runtime.getRuntime().exec(cmd); +! long startTime = System.currentTimeMillis(); +! boolean running = false; +! while (!running && +! ((System.currentTimeMillis() - startTime) < +! (READER_STARTUP_SECS * 1000))) { +! if (getProcessFile().exists()) { +! running = true; +! } else { +! Thread.sleep(10); +! } +! } + //printReaderStatus(); ++ assertTrue("ReadOnlyProcess did not start after " + ++ READER_STARTUP_SECS + " + secs", ++ running); + } + + private void stopReaderProcess() +Index: test/com/sleepycat/je/cleaner/ReadOnlyProcess.java +=================================================================== +*** test/com/sleepycat/je/cleaner/ReadOnlyProcess.java 12 Sep 2006 19:17:14 -0000 1.5 +--- test/com/sleepycat/je/cleaner/ReadOnlyProcess.java 23 Nov 2006 00:07:40 -0000 +*************** +*** 16,22 **** + import com.sleepycat.je.util.TestUtils; + + /** +! * @see ReadOnlyLockerTest + */ + public class ReadOnlyProcess { + +--- 15,21 ---- + import com.sleepycat.je.util.TestUtils; + + /** +! * @see ReadOnlyLockingTest + */ + public class ReadOnlyProcess { + +*************** +*** 36,41 **** +--- 35,43 ---- + + //System.err.println("Opened read-only: " + envHome); + //System.err.println(System.getProperty("java.class.path")); ++ ++ /* Notify the test that this process has opened the environment. */ ++ ReadOnlyLockingTest.createProcessFile(); + + /* Sleep until the parent process kills me. */ + Thread.sleep(Long.MAX_VALUE); |