Hi,
As I have written here: https://aur.archlinux.org/packages/portfolio/#news
I get error message below when trying to build this package. Looks like it is not connected to the package but somehow to me, because tinxy can build.
So I switched to this forum with the hope someone of you can help me figuring out what is my problem.
Error message:
Results:
Failures:
YahooFinanceQuoteFeedTest.testGetLatestQuoteValid:53
Expected: is <2020-04-20>
but: was <2020-04-21>
Tests run: 853, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Portfolio Performance 0.49.0:
[INFO]
[INFO] Portfolio Performance .............................. SUCCESS [ 0.318 s]
[INFO] portfolio-target-definition ........................ SUCCESS [ 0.241 s]
[INFO] name.abuchen.portfolio ............................. SUCCESS [ 9.869 s]
[INFO] name.abuchen.portfolio.tests ....................... FAILURE [ 17.885 s]
[INFO] name.abuchen.portfolio.ui .......................... SKIPPED
[INFO] name.abuchen.portfolio.ui.tests .................... SKIPPED
[INFO] name.abuchen.portfolio.bootstrap ................... SKIPPED
[INFO] name.abuchen.portfolio.feature ..................... SKIPPED
[INFO] portfolio.product .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.167 s
[INFO] Finished at: 2020-11-01T19:37:08+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:1.5.1:test (default-test) on project name.abuchen.portfolio.tests: There are test failures.
[ERROR]
[ERROR] Please refer to /home/dennis/.cache/paru/clone/portfolio/src/portfolio-0.49.0/name.abuchen.portfolio.tests/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 <args> -rf :name.abuchen.portfolio.tests
==> ERROR: A failure occurred in build().
Aborting...
error: failed to build 'portfolio-0.49.0-1':
testGetLatestQuoteValid(name.abuchen.portfolio.online.impl.YahooFinanceQuoteFeedTest) Time elapsed: 0.105 s <<< FAILURE!
java.lang.AssertionError:
Expected: is <2020-04-20>
but: was <2020-04-21>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:964)
at org.junit.Assert.assertThat(Assert.java:930)
at name.abuchen.portfolio.online.impl.YahooFinanceQuoteFeedTest.testGetLatestQuoteValid(YahooFinanceQuoteFeedTest.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:206)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:161)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:84)
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:113)
at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:593)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:205)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
Maybe an issue with your system clock or timezone settings?
I am not an expert here but the way I read this the test it tried to run returned the wrong date.
Looking at that error, it seems to be down to a feed being drawn from Yahoo Finance. The date is in April so it’s unlikely to be a local clock error, though could be due to timezone. For example, if the feed item in question is around the 00:00 time but the application doesn’t handle a change in timezone (to and from daylight savings) then it will be off by an hour. Normally it won’t make a difference, but at/around 00:00 will cause a day change.
So - check your system’s local timezone and try setting it to UTC for this test. If it passes then, report it as a bug to the upstream project.