Skip to content

Commit

Permalink
Test out fix for OpenSSL test flakiness
Browse files Browse the repository at this point in the history
`OpenSSL::TestX509Store#test_verify` has been failing intermittently on
CI about once a day:
  - http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3121244
  - http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3117661
  - http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111684

According to the test:
 > OpenSSL uses time(2) while Time.now uses clock_gettime(CLOCK_REALTIME),
 > and there may be difference.

This difference is could be the cause for the flaky failures. Let's see
if giving the certificate more room solves the problem.

In any case, I will revert this in a week. I think changes to these
should go to https://github.com/ruby/openssl/?
  • Loading branch information
XrXr committed Aug 11, 2020
1 parent 42725e3 commit 7930a35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/openssl/test_x509store.rb
Expand Up @@ -66,7 +66,7 @@ def test_verify
ee1_cert = issue_cert(@ee1, @dsa256, 10, ee_exts, ca2_cert, @rsa1024)
ee2_cert = issue_cert(@ee2, @dsa512, 20, ee_exts, ca2_cert, @rsa1024)
ee3_cert = issue_cert(@ee2, @dsa512, 30, ee_exts, ca2_cert, @rsa1024,
not_before: now-100, not_after: now-1)
not_before: now-100, not_after: now-50)
ee4_cert = issue_cert(@ee2, @dsa512, 40, ee_exts, ca2_cert, @rsa1024,
not_before: now+1000, not_after: now+2000,)

Expand Down

1 comment on commit 7930a35

@XrXr
Copy link
Member Author

@XrXr XrXr commented on 7930a35 Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does seem to fix the flakiness. It looks like the test suite is going to be revamped, though: so I won't send this to https://github.com/ruby/openssl/.

Please sign in to comment.