Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed at test stage: testUpdateWhenNotSortNumerically #1562

Closed
rudygodoy opened this issue Jun 3, 2018 · 8 comments
Closed

Build failed at test stage: testUpdateWhenNotSortNumerically #1562

rudygodoy opened this issue Jun 3, 2018 · 8 comments

Comments

@rudygodoy
Copy link

After cloning the repo, or updating an existing clone, I run ./gradlew build and it fails at the test task with the message below.

The system is Debian Linux sid (amd64), openjdk 8.

--- bisq/bisq-desktop ‹master› » ./gradlew build                                                                      1 ↵
Download https://jitpack.io/com/github/bisq-network/bitcoinj/bitcoinj-parent/6728ef8b/bitcoinj-parent-6728ef8b.pom
Download https://jitpack.io/network/bisq/libdohj/libdohj-core/dbc23c67/libdohj-core-dbc23c67.jar
Download https://jitpack.io/com/github/bisq-network/bitcoinj/bitcoinj-core/6728ef8b/bitcoinj-core-6728ef8b.jar
Download https://jitpack.io/network/bisq/bisq-core/-SNAPSHOT/bisq-core--v0.7.0-g628c785-10.jar
Download https://jitpack.io/network/bisq/bisq-p2p/-SNAPSHOT/bisq-p2p--6440d6620f-1.jar
Download https://jitpack.io/network/bisq/bisq-assets/-SNAPSHOT/bisq-assets--v0.7.0-g0f539c0-18.jar
Download https://jitpack.io/network/bisq/bisq-common/-SNAPSHOT/bisq-common--v0.7.0-g5ab7477-5.jar

> Task :compileJava 
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :compileTestJava 
Note: /home/rudy/dev/bisq/bisq-desktop/src/test/java/bisq/core/user/PreferenceMakers.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :test 

bisq.desktop.util.CurrencyListTest > testUpdateWhenNotSortNumerically FAILED
    java.lang.AssertionError at CurrencyListTest.java:104

79 tests completed, 1 failed, 6 skipped


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/rudy/dev/bisq/bisq-desktop/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4m 25s
13 actionable tasks: 11 executed, 2 up-to-date

Stacktrace for the failed test case is below:

java.lang.AssertionError: expected:<[CurrencyListItem{tradeCurrency=FiatCurrency(currency=RUR), numTrades=1}, CurrencyListItem{tradeCurrency=FiatCurrency(currency=USD), numTrades=2}, CurrencyListItem{tradeCurrency=TradeCurrency(code=BTC, name=Bitcoin), numTrades=1}, CurrencyListItem{tradeCurrency=TradeCurrency(code=ETH, name=Ether), numTrades=2}]> but was:<[CurrencyListItem{tradeCurrency=FiatCurrency(currency=USD), numTrades=2}, CurrencyListItem{tradeCurrency=FiatCurrency(currency=RUR), numTrades=1}, CurrencyListItem{tradeCurrency=TradeCurrency(code=BTC, name=Bitcoin), numTrades=1}, CurrencyListItem{tradeCurrency=TradeCurrency(code=ETH, name=Ether), numTrades=2}]>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at bisq.desktop.util.CurrencyListTest.testUpdateWhenNotSortNumerically(CurrencyListTest.java:104)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:326)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:89)
	at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:97)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:310)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:131)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.access$100(PowerMockJUnit47RunnerDelegateImpl.java:59)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner$TestExecutorStatement.evaluate(PowerMockJUnit47RunnerDelegateImpl.java:147)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.evaluateStatement(PowerMockJUnit47RunnerDelegateImpl.java:107)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:298)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:87)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:50)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:218)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:160)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:134)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:136)
	at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:121)
	at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:57)
	at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:116)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:59)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:39)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy1.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:146)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:128)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.lang.Thread.run(Thread.java:748)
@rudygodoy
Copy link
Author

rudygodoy commented Jun 27, 2018 via email

@ManfredKarrer
Copy link
Member

Hi @rudygodoy Sorry for closing with comment. I just read the logs again. It was with the 0.7.0 branch, maybe there was an issue with failing tests, thought I would be surprised as it would have failed in the binary build as well. Can you use the latest master, there all should work.

@ManfredKarrer ManfredKarrer reopened this Jun 27, 2018
@rudygodoy
Copy link
Author

rudygodoy commented Jul 4, 2018

Hello @ManfredKarrer as I've previously mentioned in the report, I've used the latest master and the problem persists. The only difference with my environment and the CI build, despite it just does ./gradlew check, it's the JDK version. I'm using OpenJDK 1.8 and CI is using Oracle's.

@rudygodoy
Copy link
Author

I believe I've found the issue. It's related to the locale I'm using. Setting LC_ALL to en_US for the build allows it to pass all tests.

@ManfredKarrer
Copy link
Member

Ah damn locales... should be fixed in the test...

@ManfredKarrer
Copy link
Member

I assume that is resolved in the meantime. Otherwise please re-open.

@Talkless
Copy link

@ManfredKarrer I got this when building v0.9.3 on Ubuntu 18.04 amd64 VM with:

$ apt show openjdk-11-jdk
Package: openjdk-11-jdk
Version: 10.0.2+13-1ubuntu0.18.04.4

Error:

bisq.desktop.util.CurrencyListTest > testUpdateWhenNotSortNumerically FAILED                                                    
    java.lang.AssertionError: expected:<[CurrencyListItem{tradeCurrency=FiatCurrency(currency=RUR), numTrades=1}, CurrencyListItem{tradeCurrency=FiatCurrency(currency=USD), numTrades=2}, CurrencyListItem{
tradeCurrency=TradeCurrency(code=BTC, name=Bitcoin), numTrades=1}, CurrencyListItem{tradeCurrency=TradeCurrency(code=ETH, name=Ether), numTrades=2}]> but was:<[CurrencyListItem{tradeCurrency=FiatCurrency(
currency=USD), numTrades=2}, CurrencyListItem{tradeCurrency=FiatCurrency(currency=RUR), numTrades=1}, CurrencyListItem{tradeCurrency=TradeCurrency(code=BTC, name=Bitcoin), numTrades=1}, CurrencyListItem{t
radeCurrency=TradeCurrency(code=ETH, name=Ether), numTrades=2}]>                                             
        at org.junit.Assert.fail(Assert.java:88)                                                    
        at org.junit.Assert.failNotEquals(Assert.java:834)                                                      
        at org.junit.Assert.assertEquals(Assert.java:118)                                                        
        at org.junit.Assert.assertEquals(Assert.java:144)                                                                            
        at bisq.desktop.util.CurrencyListTest.testUpdateWhenNotSortNumerically(CurrencyListTest.java:106)

My system's locale is lt_LT.UTF-8. Using LC_ALL=en_US fixes the problem.

@ManfredKarrer
Copy link
Member

@Talkless Thanks for reporting. I created an issue for it at #2259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants