Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestS3RestSigner is flaky #10599

Open
snazy opened this issue Jun 28, 2024 · 1 comment
Open

TestS3RestSigner is flaky #10599

snazy opened this issue Jun 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@snazy
Copy link
Member

snazy commented Jun 28, 2024

Apache Iceberg version

main (development)

Query engine

None

Please describe the bug 馃悶

The

TestS3RestSigner > executionError FAILED
    org.opentest4j.AssertionFailedError: [should not have any expired token that required a refresh] 
    expected: 0L
     but was: 1L
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at org.apache.iceberg.aws.s3.signer.TestS3RestSigner.afterClass(TestS3RestSigner.java:120)

/cc @nastra

@snazy snazy added the bug Something isn't working label Jun 28, 2024
@amogh-jahagirdar
Copy link
Contributor

I took a brief look, seems like the assertions depend on all of the tests completing within 100 seconds. https://github.com/apache/iceberg/blob/main/aws/src/test/java/org/apache/iceberg/aws/s3/signer/TestS3RestSigner.java#L110. I verified this is the case by just adding a sleep in a test.

It seems like the purpose of the tests is to validate behavior around token refresh. Ideally we shouldn't rely on the timing of the test completion for this, perhaps there is a more deterministic way of testing what we want to test. cc @nastra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants