dain / leveldb

Port of LevelDB to Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails

tarung opened this issue · comments

Maven build fails with following error :

Tests run: 73, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 230.714 sec <<< FAILURE!

Results :

Failed tests:
testCantCreateDirectoryReturnMessage(org.iq80.leveldb.impl.DbImplTest):

Tests run: 73, Failures: 1, Errors: 0, Skipped: 0

What platform and JDK are you running on?

Windows 7 64 Bit
java version 1.7.0_03

Here is the result of 'mvn --version'
C:\work\workspace\dain-leveldb>mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: C:\work\apache-maven\bin..
Java version: 1.7.0_03, vendor: Oracle Corporation
Java home: c:\Progra~2\Java\jdk1.7.0_03\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

Regards
Tarun

Some more details about the error...

Thanks and Regards,
Tarun


T E S T S

Running TestSuite
50000 rows written
100000 rows written
150000 rows written
Adding
at: 0
at: 100000
at: 200000
at: 300000
at: 400000
at: 500000
at: 600000
at: 700000
at: 800000
at: 900000
corruption of 35 bytes: Partial record without end
corruption of 35 bytes: Partial record without end
corruption of 35 bytes: Partial record without end
Deleting
at: 0
at: 100000
at: 200000
at: 300000
at: 400000
at: 500000
at: 600000
at: 700000
at: 800000
at: 900000
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
corruption of 23 bytes: Partial record without end
Adding
at: 0
at: 100000
at: 200000
at: 300000
at: 400000
at: 500000
at: 600000
at: 700000
at: 800000
at: 900000
Tests run: 73, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 138.771 sec <<< FAILURE!

Results :

Failed tests:
testCantCreateDirectoryReturnMessage(org.iq80.leveldb.impl.DbImplTest):

Tests run: 73, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] leveldb-project ................................... SUCCESS [1.406s]
[INFO] leveldb-api ....................................... SUCCESS [1.064s]
[INFO] leveldb ........................................... FAILURE [2:19.381s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:22.059s
[INFO] Finished at: Mon May 07 14:55:18 IST 2012
[INFO] Final Memory: 8M/21M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.8.1:test (default-test) on project leveldb: There are test failures.
[ERROR]
[ERROR] Please refer to C:\work\workspace\dain-leveldb\leveldb\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :leveldb

Can you provide the contents of target/surefire-reports/TestSuite.txt?

Contents pasted Below
-Thanks


Test set: TestSuite

Tests run: 73, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 133.855 sec <<< FAILURE!
testCantCreateDirectoryReturnMessage(org.iq80.leveldb.impl.DbImplTest) Time elapsed: 0.01 sec <<< FAILURE!
org.testng.TestException:
The exception was thrown with the wrong message: expected "Database directory '/foo/bar/doowop/idontexist'.*" but got "Database '\foo\bar\doowop\idontexist' exists and the error if exists option is enabled"
at org.testng.internal.Invoker.handleInvocationResults(Invoker.java:1409)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:722)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1147)
at org.testng.TestRunner.privateRun(TestRunner.java:749)
at org.testng.TestRunner.run(TestRunner.java:600)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
at org.testng.SuiteRunner.run(SuiteRunner.java:223)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
at org.testng.TestNG.run(TestNG.java:900)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:149)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:95)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: java.lang.IllegalArgumentException: Database '\foo\bar\doowop\idontexist' exists and the error if exists option is enabled
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)
at org.iq80.leveldb.impl.DbImpl.(DbImpl.java:150)
at org.iq80.leveldb.impl.DbImplTest$DbStringWrapper.(DbImplTest.java:917)
at org.iq80.leveldb.impl.DbImplTest$DbStringWrapper.(DbImplTest.java:906)
at org.iq80.leveldb.impl.DbImplTest.testCantCreateDirectoryReturnMessage(DbImplTest.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:76)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
... 29 more
Caused by: java.lang.IllegalArgumentException: Database '\foo\bar\doowop\idontexist' exists and the error if exists option is enabled
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)
at org.iq80.leveldb.impl.DbImpl.(DbImpl.java:150)
at org.iq80.leveldb.impl.DbImplTest$DbStringWrapper.(DbImplTest.java:917)
at org.iq80.leveldb.impl.DbImplTest$DbStringWrapper.(DbImplTest.java:906)
at org.iq80.leveldb.impl.DbImplTest.testCantCreateDirectoryReturnMessage(DbImplTest.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:76)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
... 29 more

Same issue in my case.

d:\Jake\Dropbox\Java\leveldb>mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\Program Files (x86)\Apache Software Foundation\apache-maven
Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
Java home: c:\Program Files (x86)\Java\jdk1.6.0_30\jre
Default locale: pl_PL, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

Contents of target/surefire-reports/TestSuite.txt

Test set: TestSuite

Tests run: 73, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 148.547 sec <<< FAILURE!
testCantCreateDirectoryReturnMessage(org.iq80.leveldb.impl.DbImplTest) Time elapsed: 0.185 sec <<< FAILURE!
org.testng.TestException:
Method org.iq80.leveldb.impl.DbImplTest.testCantCreateDirectoryReturnMessage() should have thrown an exception of class java.lang.IllegalArgumentException
at org.testng.internal.Invoker.handleInvocationResults(Invoker.java:1442)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:722)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1147)
at org.testng.TestRunner.privateRun(TestRunner.java:749)
at org.testng.TestRunner.run(TestRunner.java:600)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
at org.testng.SuiteRunner.run(SuiteRunner.java:223)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
at org.testng.TestNG.run(TestNG.java:900)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:149)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:95)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

builds fine here, both with jdk6 and jdk7

Looks like this is simply a issue with checking for an exact match for a file name in an error message between windows and unix. I changed the pattern to allow any character in the place of the slashes. The fix is checked into trunk. If the fix doesn't work, reopen the issue with more details.