【问题标题】:AWS SDK C++: Some S3 Integration tests failAWS SDK C++:一些 S3 集成测试失败
【发布时间】:2017-05-10 16:19:09
【问题描述】:

如果某些 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

【问题讨论】:

    标签: c++ amazon-web-services amazon-s3 aws-sdk-cpp


    【解决方案1】:

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

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

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

    【讨论】:

    • 这很有趣。 :) 谢谢。
    • 是的,确实如此。非常感谢。
    猜你喜欢
    • 2016-10-08
    • 2022-11-03
    • 1970-01-01
    • 2017-03-29
    • 2012-10-22
    • 2018-02-22
    • 2019-02-27
    • 2019-12-26
    • 1970-01-01
    相关资源
    最近更新 更多