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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: some tests from ITStorageTest fail if run individually #409

Closed
dmitry-fa opened this issue Jun 30, 2020 · 1 comment · Fixed by #439
Closed

test: some tests from ITStorageTest fail if run individually #409

dmitry-fa opened this issue Jun 30, 2020 · 1 comment · Fixed by #439
Assignees
Labels
api: storage Issues related to the googleapis/java-storage API. type: cleanup An internal cleanup or hygiene concern.

Comments

@dmitry-fa
Copy link
Contributor

Some tests from ITStorageTest depend on other tests and fail if run individually.
Example: If I run testListBlobRequeserPays from IDE as a single test it fails with:

at com.google.cloud.storage.it.ITStorageTest.testListBlobRequesterPays(ITStorageTest.java:917)
...

But when I run all the tests as a bunch it passes.

Probably, it's not a single test depending on others.

@dmitry-fa dmitry-fa self-assigned this Jun 30, 2020
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Jun 30, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jul 1, 2020
@frankyn frankyn added type: cleanup An internal cleanup or hygiene concern. and removed triage me I really want to be triaged. labels Jul 1, 2020
@dmitry-fa
Copy link
Contributor Author

The following problems have been detected:

  • testListBlobRequesterPays, testUpdateBucketRequesterPays - fail if run individually. They expect BUCKET.getRequesterPays() returns false, but it returns null. BUCKET.getRequesterPays() starts returning false after some other tests are executed.

  • testAttemptDeletionObjectTemporaryHold hangs trying to delete blob. Because it set temporary hold, but restore event based hold:

 public void testAttemptDeletionObjectTemporaryHold() {
    BlobInfo blobInfo = BlobInfo.newBuilder(BUCKET, blobName).setTemporaryHold(true).build();
    ...
    try {
      ...
    } finally {
      remoteBlob.toBuilder().setEventBasedHold(false).build().update();
    }
  }
  • testBucketAcl, testUpdateBucketRequesterPays update bucket used by majority of the tests. It requires cleanup before each test (extra work). These tests could use a dedicated bucket, only tests using this bucket will require that cleanup.

  • testBucketPolicyV1RequesterPays creates a new bucket, it could use the bucket for the requester pays tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants