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

[snmp] Set thing only online on valid response #8759

Merged
merged 2 commits into from
Oct 25, 2020

Conversation

Hilbrand
Copy link
Member

Otherwise it will toggles between online and offline when the call always times-out, which can happen when the device is unreachable (or a wrong ip address configured).

Otherwise it will toggles between online and offline when the call always times-out, which can happen when the device is unreachable (or a wrong ip address configured).

Signed-off-by: Hilbrand Bouwkamp <[email protected]>
@Hilbrand Hilbrand added the bug An unexpected problem or unintended behavior of an add-on label Oct 15, 2020
@Hilbrand Hilbrand requested a review from J-N-K as a code owner October 15, 2020 15:46
@TravisBuddy
Copy link

TravisBuddy commented Oct 15, 2020

Travis tests were successful

Hey @Hilbrand,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@J-N-K
Copy link
Member

J-N-K commented Oct 15, 2020

Look like you need to fix the tests

The status is now set ONLINE only when a succesful response is received.
Adapted unit tests to check for it after response is processed.
Refactored deprecated initMocks to openMocks.

Signed-off-by: Hilbrand Bouwkamp <[email protected]>
@Hilbrand
Copy link
Member Author

Doh! I was so focused on not forgetting to run spotless that I completely forgot to run a install 🤦

@J-N-K J-N-K merged commit c7b86c0 into openhab:main Oct 25, 2020
@J-N-K J-N-K added this to the 3.0.0.M2 milestone Oct 25, 2020
@Hilbrand Hilbrand deleted the snmp-online branch October 25, 2020 16:13
boehan pushed a commit to boehan/openhab-addons that referenced this pull request Apr 12, 2021
* [snmp] Set thing only online on valid response

Otherwise it will toggles between online and offline when the call always times-out, which can happen when the device is unreachable (or a wrong ip address configured).

Signed-off-by: Hilbrand Bouwkamp <[email protected]>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* [snmp] Set thing only online on valid response

Otherwise it will toggles between online and offline when the call always times-out, which can happen when the device is unreachable (or a wrong ip address configured).

Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants