Hi, my name is Bjørn Forsman I'm new here. I tested jNetMap-0.5.4 yesterday and I like it! I want to package jNetMap for Nix/nixpkgs (https://nixos.org/nix/), preferably building from source. I see the latest release is quite old (~3 years), so I checked out latest svn trunk in hopes of there being a new release soon(ish).
But "mvn package" errors out during the test phase. You can see the full error below my sig.
--
Regards,
Bjørn Forsman
$ mvn package [...] ------------------------------------------------------- T E S T S ------------------------------------------------------- Running ch.rakudave.jnetmap.model.device.HostTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.31 sec Running ch.rakudave.jnetmap.model.IF.PhysicalIFTest 11:04:55 WARN: Address undefined or Subnet not found: 277.344.33.2 11:04:55 WARN: Address not found: ringo 11:04:55 WARN: Gateway not found: ringo Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.038 sec Running ch.rakudave.jnetmap.model.IF.LogicalIFTest Address not found: Ringo 11:04:55 WARN: Address undefined or Subnet not found: 277.344.33.2 Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running ch.rakudave.jnetmap.model.IF.TransparentIFTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running ch.rakudave.jnetmap.model.MapTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.038 sec Running ch.rakudave.jnetmap.util.SettingsTest Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec <<< FAILURE! getTest(ch.rakudave.jnetmap.util.SettingsTest) Time elapsed: 0.005 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<[Bottom]> but was:<[1]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at ch.rakudave.jnetmap.util.SettingsTest.getTest(SettingsTest.java:43) 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.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Running ch.rakudave.jnetmap.util.LangTest 11:04:55 WARN: No translation for English Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Running ch.rakudave.jnetmap.util.CryptoTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec Running ch.rakudave.jnetmap.controller.command.CommandHistoryTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec Running ch.rakudave.jnetmap.net.status.IsReachableTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.41 sec Running ch.rakudave.jnetmap.net.status.NativePingTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.218 sec Running ch.rakudave.jnetmap.net.status.OpenSocketTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Results : Failed tests: getTest(ch.rakudave.jnetmap.util.SettingsTest): expected:<[Bottom]> but was:<[1]> Tests run: 40, Failures: 1, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.211 s [INFO] Finished at: 2018-12-28T11:04:59+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project jnetmap: There are test failures. [ERROR] [ERROR] Please refer to /home/bfo/proj/code/forks/jnetmap-svn/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
Hi Bjørn! I love hearing about your packaging efforts, and yes I've switched to maven for 0.5.5 (which I intend to release asap-ish), so that's the way to go. I'm currently investigating your issue - in the mean time you can run mvn with -Dmaven.test.skip=true so this doesn't block your work...
I was able to reproduce this on a non-initialized system, i.e. when jNetMapo has never been started before (which will always be the case when you build from source ^^). The tests in question made some assumptions that don't hold in that case, which I've fixed in the latest commit. Can you try again?
I did "svn up", got revision 682, and ran "mvn package" again. Success! Thanks!