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
[systeminfo] Add CPU frequency channels #16012
Conversation
Build failed because of the integration tests that had minimal change. The failure was also not only in the added tests. |
Tests are failing now. I don't see the immediate reason for it yet. |
Tests were failing because I included update instructions for the 2 added channels. All of the tests create a thing with only the channel being tested. However, with the update instructions, when the newly created thing is added to the ManagedThingProvider: Line 282 in 8ed05c5
it gets the new channels added to the thing as well (and not just the channels added with the ThingBuilder). The result for all of the tests is that the thing handler initialization fails. To make this work again, all of the tests would have to be revisited to work with a full set of channels, and not just the channel being tested, unless someone has a better suggestions. I therefore opted to not include update instructions. The user will have to remove and recreate the thing if he wants to benefit from the extra channels. |
Why is the thing handler initialization failing? |
I am not entirely sure. The next line in the test (assertion on the thing handler) times out whereby the thing handler is null. That would indicate the thing handler initalization is not even running. However, running it through a debugger, the handler factory is called and the handler creation is called from there. |
Just add |
Thanks, I used this:
I believe I tried this before:
but I then ended up with a thing that also has the new channels. And that would mean I would need to mock the refresh on these channels for all tests as well (easy enough to do in the setup, but not necessary for each test). |
DCO failure is because the revert commit was not signed off. If that is an issue, I can squash that with the original to solve it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only an ultra minor comment
...eminfo/src/main/java/org/openhab/binding/systeminfo/internal/SysteminfoBindingConstants.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
Build is now failing and I don't understand why. I rebased but it didn't help. The last commit is only a javadoc change, so cannot have an impact. I have the impression there are other addon PR's suddenly failing the build. I also have a failed local build. |
Build was aborted after 240 minutes. |
Build finally succeeded. |
This is not necessary. The PR build is performed on the PR branch merged with target branch. |
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Resolves #15844
Resolves #15608
This PR adds CPU frequency (clock speed) channels to the binding, exposing underlying functionality from the OSHI library. Note that the availability of this information may vary by platform. In my tests on Windows, I could not get reliable information. It did work well on an RPi 4.
It also solves some documentation issues.