0

如果某些 S3 集成测试失败,我该怎么办?可以在 Internet 上找到任何有用的解决方案。仅使用了 -DBUILD_ONLY="s3" 编译参数。1.0.99 标签上的 repo os。这是 ./aws-cpp-sdk-s3-integration-tests 的日志:

[==========] Running 8 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 8 tests from BucketAndObjectOperationTest
[ RUN      ] BucketAndObjectOperationTest.TestInterrupt
/home/user/workspace/aws-sdk-cpp/aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp:317: Failure
Value of: createBucketOutcome.IsSuccess()
  Actual: false
Expected: true
[  FAILED  ] BucketAndObjectOperationTest.TestInterrupt (580 ms)
[ RUN      ] BucketAndObjectOperationTest.TestBucketCreationAndListing
[       OK ] BucketAndObjectOperationTest.TestBucketCreationAndListing (1057 ms)
[ RUN      ] BucketAndObjectOperationTest.TestBucketLocation
[       OK ] BucketAndObjectOperationTest.TestBucketLocation (1756 ms)
[ RUN      ] BucketAndObjectOperationTest.TestObjectOperations
/home/user/workspace/aws-sdk-cpp/aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp:468: Failure
Value of: createBucketOutcome.IsSuccess()
  Actual: false
Expected: true
[  FAILED  ] BucketAndObjectOperationTest.TestObjectOperations (110 ms)
[ RUN      ] BucketAndObjectOperationTest.TestKeysWithCrazyCharacterSets
/home/user/workspace/aws-sdk-cpp/aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp:547: Failure
Value of: createBucketOutcome.IsSuccess()
  Actual: false
Expected: true
[  FAILED  ] BucketAndObjectOperationTest.TestKeysWithCrazyCharacterSets (121 ms)
[ RUN      ] BucketAndObjectOperationTest.TestObjectOperationsWithPresignedUrls
/home/user/workspace/aws-sdk-cpp/aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp:641: Failure
Value of: createBucketOutcome.IsSuccess()
  Actual: false
Expected: true
[  FAILED  ] BucketAndObjectOperationTest.TestObjectOperationsWithPresignedUrls (116 ms)
[ RUN      ] BucketAndObjectOperationTest.TestMultiPartObjectOperations
[       OK ] BucketAndObjectOperationTest.TestMultiPartObjectOperations (23499 ms)
[ RUN      ] BucketAndObjectOperationTest.TestThatErrorsParse
[       OK ] BucketAndObjectOperationTest.TestThatErrorsParse (667 ms)
[----------] 8 tests from BucketAndObjectOperationTest (27907 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 1 test case ran. (29961 ms total)
[  PASSED  ] 4 tests.
[  FAILED  ] 4 tests, listed below:
[  FAILED  ] BucketAndObjectOperationTest.TestInterrupt
[  FAILED  ] BucketAndObjectOperationTest.TestObjectOperations
[  FAILED  ] BucketAndObjectOperationTest.TestKeysWithCrazyCharacterSets
[  FAILED  ] BucketAndObjectOperationTest.TestObjectOperationsWithPresignedUrls

 4 FAILED TESTS
4

1 回答 1

0

在 v1.0.122 之前,s3 集成测试使用固定的存储桶名称。

由于 S3 存储桶名称是全球唯一的,如果世界上任何地方的某个人运行集成测试并在中途中止它们,则拆卸/清理代码将不会运行,并且使用固定名称创建的存储桶将存在于该帐户下。这将导致其他所有人的集成测试失败。

v1.0.122+ 通过使用附加到存储桶名称的随机后缀来解决该问题。

于 2017-06-02T04:36:17.760 回答