-
Notifications
You must be signed in to change notification settings - Fork 5
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
clippy: elide needless lifetime #154
Conversation
Signed-off-by: Adam Cattermole <[email protected]>
Looks like we're hitting the header re-ordering issue again in the integration tests... I'm wondering if this is in some way related to the cargo version as it passed 4 hours ago (on 1.82) and now fails (on 1.83).. I'll re-run a few times to check if it's failing consistently |
Wondering if we should not assert against |
Signed-off-by: Adam Cattermole <[email protected]>
I agree, and these have proven too much of a headache - I've removed in the latest commit. In the refactor we should ideally use unit tests to check the messages ( |
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.
🙌
testing the wire format representation is rarely a good idea... some json library do reshuffle or otherwise slightly change the input purposefully to avoid having users doing these checks... e.g. {"foo": 1, "bar": true}
is equivalent to { "bar": true, "foo" :1}
. Set
semantic is usually a good candidate for these assumption to break... as was the case here.
That's something I tried. It turns out that the crate type is |
No, that's unrelated... what @adam-cattermole is saying, have these assertions in unit tests just like all the other unit tests that exist already, not in integration tests. |
I was more thinking unit tests not integration, where we test the parts of the application work without the "filter" bits |
TBH not really. What I want to assert is on the descriptor entries being sent to the wire. Obviously we are failing to do that now, so this change is just saving some headache.. but I wanted to highlight that this is still a tech debt.. "I want to assert that I send descriptor entries A1 == B1 and A2 == B2" |
Right, and that doesn't need to be an integration test. This is currently tested for at the wrong abstraction layer. |
I guess what I'm suggesting is that if we can get to a point where we have a separation of the "filtercontext" code from the part that is processing an action/operation we can unit test that a message is being created correctly... rather than integration testing that it's being created and then serialized |
New lint in 1.83 (we're pinned to 1.75 locally iirc but will hit this on PR)