[network] failing tests
See original GitHub issueOn Mac Os the new network tests are failing:
Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.13 sec <<< FAILURE! - in org.openhab.binding.network.internal.PresenceDetectionTest
partialAndFinalCallbackTests(org.openhab.binding.network.internal.PresenceDetectionTest) Time elapsed: 0.042 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at org.openhab.binding.network.internal.PresenceDetectionTest.setUp(PresenceDetectionTest.java:78)
cacheTest(org.openhab.binding.network.internal.PresenceDetectionTest) Time elapsed: 0.025 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at org.openhab.binding.network.internal.PresenceDetectionTest.setUp(PresenceDetectionTest.java:78)
reuseValueTests(org.openhab.binding.network.internal.PresenceDetectionTest) Time elapsed: 0.022 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at org.openhab.binding.network.internal.PresenceDetectionTest.setUp(PresenceDetectionTest.java:78)
threadCountTest(org.openhab.binding.network.internal.PresenceDetectionTest) Time elapsed: 0.024 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at org.openhab.binding.network.internal.PresenceDetectionTest.setUp(PresenceDetectionTest.java:78)
Running org.openhab.binding.network.internal.PresenceDetectionValuesTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec - in org.openhab.binding.network.internal.PresenceDetectionValuesTest
updateLatencyTests(org.openhab.binding.network.internal.PresenceDetectionValuesTest) Time elapsed: 0 sec
pingTests(org.openhab.binding.network.internal.PresenceDetectionValuesTest) Time elapsed: 0.006 sec
isFinishedTests(org.openhab.binding.network.internal.PresenceDetectionValuesTest) Time elapsed: 0 sec
tcpTests(org.openhab.binding.network.internal.PresenceDetectionValuesTest) Time elapsed: 0.001 sec
Running org.openhab.binding.network.internal.utils.NetworkUtilsTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in org.openhab.binding.network.internal.utils.NetworkUtilsTest
testInterfaceIPS(org.openhab.binding.network.internal.utils.NetworkUtilsTest) Time elapsed: 0.003 sec
testConvertMethods(org.openhab.binding.network.internal.utils.NetworkUtilsTest) Time elapsed: 0 sec
Running org.openhab.binding.network.toberemoved.cache.ExpiringCacheAsyncTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.129 sec - in org.openhab.binding.network.toberemoved.cache.ExpiringCacheAsyncTest
testConstructorWrongCacheTime(org.openhab.binding.network.toberemoved.cache.ExpiringCacheAsyncTest) Time elapsed: 0.001 sec
testExpiring(org.openhab.binding.network.toberemoved.cache.ExpiringCacheAsyncTest) Time elapsed: 0.11 sec
testConstructorNoRefrehCommand(org.openhab.binding.network.toberemoved.cache.ExpiringCacheAsyncTest) Time elapsed: 0 sec
testFetchValue(org.openhab.binding.network.toberemoved.cache.ExpiringCacheAsyncTest) Time elapsed: 0.012 sec
testFetchExpiredValue(org.openhab.binding.network.toberemoved.cache.ExpiringCacheAsyncTest) Time elapsed: 0.003 sec
Results :
Failed tests:
PresenceDetectionTest.setUp:78
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
PresenceDetectionTest.setUp:78
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
PresenceDetectionTest.setUp:78
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
PresenceDetectionTest.setUp:78
Expected: is <SYSTEM_PING>
but: was <JAVA_PING>
Tests run: 24, Failures: 4, Errors: 0, Skipped: 0
Which is not completely surprising given the code:
public void setPingMethod(PresenceDetection.PingMethod pingMethod) {
if (pingMethod == PresenceDetection.PingMethod.SYSTEM_PING && !this.networkUtils.isNativePingWorking()) {
pingMethod = PresenceDetection.PingMethod.JAVA_PING;
}
this.pingMethod = pingMethod;
}
@davidgraeff can you please look into this
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Do You Conduct Network Failure Testing? - NetCraftsmen
Good failure testing requires an investment in time and planning. But it delivers good rewards in understanding how your network reacts to failures...
Read more >How to Conduct a Network Stability Test - Comparitech
We show you how to conduct a network stability test using both command line and professional tools. Learn what to look out for...
Read more >Network issues simulation: How to test against bad ... - Medium
Network issues simulation: How to test against bad network conditions ... This particular article would be devoted to network failure ...
Read more >5 Types of Network Failures and How to Prevent Them
Networks are complicated, and the number of things THAT can go wrong is staggering. We have compiled a list of 5 network failure...
Read more >Testing my connection fails
You might have a problem with your Internet connection. Try visiting a website with your web browser to test this. You can try...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@martinvw Solution would be a special case (org.apache.commons.lang3.SystemUtils.IS_OS_MAC) for MacOS and using an uppercase “W” instead of a lowercase “w” argument, I guess?
Alternatively, the ping util is feature checked when the binding is started.
I have also a test failure: