-
Notifications
You must be signed in to change notification settings - Fork 98
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
Fix Flaky Client Certificate Authentication Test #1617
base: master
Are you sure you want to change the base?
Conversation
assertThat(response, containsString("Found 1 certificate(s).")); | ||
assertThat(response, containsString("-----BEGIN CERTIFICATE-----")); | ||
assertThat(response, containsString("-----END CERTIFICATE-----")); | ||
|
||
final ProcessingException processingException = assertThrows(ProcessingException.class, |
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.
Why are you expecting a ProcessingException
? The test should succeed
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.
Should the test retry on ProcessingException
? For example
@RetryFor(value = {IOException.class, ProcessingException.class}, attempts = 10, intervalMs = 10000)
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.
The successful client_certificate
test has been replaced and is now an expected failure? And the failure case fail_on_no_client_certificate
has been removed? There should be one success and one failure test.
@@ -223,6 +225,8 @@ public void update_person_missing_private_key_unauthorised() throws Exception { | |||
"mnt-by: OWNER-MNT\n" + | |||
"source: TEST"); | |||
|
|||
sendUpdateRequest(updatedPerson); |
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.
Why was an extra update added to the test?
Alternative : #1625 |
This PR attempts to fix the flaky (flapping) integration test:
It seems that the retryFor is not enough. Most of the times it works well after performing an OK request.
There are some time that even performing an OK request is not enough, for those situation I think that we should keep the retryFor. Following this, the test are OK
I think that the root issue is with the setup of the IT for Client Certificate. This requires a deeper look at the integration test set up