[x] Added tests for code changes or test/build only changes
[x] Updated the change log file (CHANGES.md|CHANGELOG.md) or test/build only changes
[x] Completed the PR template below:
Description
Fixed timing window in testNewCookieRequestMadeAfterExpiry
Fixes #460
Approach
There were some truncations from millisecond timestamps from System.currentTimeMillis() to cookie-date format which only has 1 second granularity. Under unfavourable circumstances this could reduce the time of the cookie lifetime by up to nearly 2 seconds. Since the test was using a 2 second cookie lifetime occasionally there would be a very small window for the test requests to actually be made before the cookie "expired".
Resolved by:
Extended mock test cookie lifetime to 3 seconds.
Moved mock cookie timestamping closer to when the cookie is queued.
Note these are test only changes.
Schema & API Changes
"No change"
Security and Privacy
"No change"
Testing
Modified existing tests as described above.
Looped test 315 times locally without failure, previously failure was typically observed once every 30 iterations of the test.
Checklist
CHANGES.md
|CHANGELOG.md
) or test/build only changesDescription
Fixed timing window in
testNewCookieRequestMadeAfterExpiry
Fixes #460
Approach
There were some truncations from millisecond timestamps from
System.currentTimeMillis()
to cookie-date format which only has 1 second granularity. Under unfavourable circumstances this could reduce the time of the cookie lifetime by up to nearly 2 seconds. Since the test was using a 2 second cookie lifetime occasionally there would be a very small window for the test requests to actually be made before the cookie "expired".Resolved by:
Note these are test only changes.
Schema & API Changes
Security and Privacy
Testing
Monitoring and Logging