-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix flake on rabbitmq_mqtt auth_SUITE #13180
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
Conversation
b10f99a to
8b2d782
Compare
ansd
left a comment
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.
CI fails
8b2d782 to
9c90e87
Compare
|
This fix was only for the flake on the mqtt auth_SUITE ... I cannot see any test suite related to mqtt or mqtt's auth_SUITE failing besides the dialyzer suite. |
46ff092 to
dab66e9
Compare
74b3ee4 to
d702ce8
Compare
d702ce8 to
3a61274
Compare
| MqttClientId = <<"other_client_id">>, | ||
| {ok, C} = connect_ssl(MqttClientId, Config), | ||
| ?assertMatch({error, _}, emqtt:connect(C)), | ||
| {error, {client_identifier_not_valid, _}} = emqtt:connect(C), |
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.
This PR doesn't fix the flake. I can repro the flake locally as follows:
{error, {client_identifier_not_valid, _}} = emqtt:connect(C),
timer:sleep(1),
unlink(C).which makes the test fail with:
=== === Reason: {'EXIT',{shutdown,client_identifier_not_valid}}
That's the flake which we also observed in CI.
The correct fix is to unlink first, then connect.
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.
i cannot reproduce it locally and i dont see CI failing because of this . I can modify the test as you suggest though.
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.
I still dont understand what you are suggesting. I am expecting that when the user connects it fails because the client_id is not valid. That is exactly what it is doing line 594.
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.
Can you send me the link to the failed job in CI where this test case is failing ?
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.
Can you send me the link to the failed job in CI where this test case is failing ?
Yes, here are two flakes failing due to {'EXIT',{shutdown,client_identifier_not_valid}}:
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.
i cannot reproduce it locally and i dont see CI failing because of this .
The CT test case process runs concurrently with the MQTT connection process. CI can fail if the CT test case process executes unlink(C) after receiving the EXIT signal.
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.
I still dont understand what you are suggesting.
I'm suggesting to flip the two lines, i.e. to unlink before the expected failure as done in many other places in this test suite, e.g. in:
rabbitmq-server/deps/rabbitmq_mqtt/test/auth_SUITE.erl
Lines 810 to 812 in 3a61274
unlink(C2), ?assertMatch({error, _}, emqtt:connect(C2)), rabbitmq-server/deps/rabbitmq_mqtt/test/auth_SUITE.erl
Lines 945 to 947 in 3a61274
unlink(C2), ?assertMatch({error, _}, emqtt:connect(C2)), rabbitmq-server/deps/rabbitmq_mqtt/test/auth_SUITE.erl
Lines 1227 to 1228 in 3a61274
unlink(C), ?assertMatch({error, _}, emqtt:connect(C)),
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.
those ci failures are because this change has not been merged yet
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.
Regardless i have committed that change.
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.
but in this PR, with just my changes you dont see the flake. You will see the flake in other CI which do not have this fix.
* Separate invalid client test from the valid one * Apply same changes from pr #13197 * Deal with stalereferences caused by timing issues looking up objects in the DOM * Unlink before assertion (cherry picked from commit 2ab890f) (cherry picked from commit e84a516) # Conflicts: # deps/rabbitmq_mqtt/test/auth_SUITE.erl # selenium/package.json
(cherry picked from commit bf7de92) # Conflicts: # deps/rabbitmq_mqtt/test/auth_SUITE.erl
* Separate invalid client test from the valid one * Apply same changes from pr #13197 * Deal with stalereferences caused by timing issues looking up objects in the DOM * Unlink before assertion
Proposed Changes
Separate invalid client test from the valid one onto separate group and this way they use different SSL certs
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that apply