|
18 | 18 | #include <aws/core/utils/memory/AWSMemory.h> |
19 | 19 | #include <aws/core/utils/UnreferencedParam.h> |
20 | 20 | #include <aws/core/utils/Outcome.h> |
| 21 | +#include <aws/core/utils/StringUtils.h> |
21 | 22 | #include <aws/core/utils/memory/stl/AWSSet.h> |
22 | 23 | #include <aws/core/utils/memory/stl/AWSStringStream.h> |
23 | 24 | #include <aws/core/utils/ratelimiter/DefaultRateLimiter.h> |
@@ -61,7 +62,9 @@ static const char BASE_VALIDATION_TABLE[] = "Validation"; |
61 | 62 | static const char BASE_CRUD_TEST_TABLE[] = "Crud"; |
62 | 63 | static const char BASE_CRUD_CALLBACKS_TEST_TABLE[] = "Crud_WithCallbacks"; |
63 | 64 | static const char BASE_THROTTLED_TEST_TABLE[] = "Throttled"; |
| 65 | +#if !AWS_SDK_USE_CRT_HTTP |
64 | 66 | static const char BASE_LIMITER_TEST_TABLE[] = "Limiter"; |
| 67 | +#endif |
65 | 68 | static const char BASE_ATTRIBUTEVALUE_TEST_TABLE[] = "AttributeValue"; |
66 | 69 |
|
67 | 70 | static const char ALLOCATION_TAG[] = "TableOperationTest"; |
@@ -814,6 +817,9 @@ TEST_F(TableOperationTest, TestCrudOperationsWithCallbacks) |
814 | 817 | } |
815 | 818 | } |
816 | 819 |
|
| 820 | +// TODO: the CRT HTTP client doesn't apply readRateLimiter, so this test only runs on the legacy transports. |
| 821 | +// Run it on the CRT too once aws-c-http has a throughput cap the SDK's rate limiter can use. |
| 822 | +#if !AWS_SDK_USE_CRT_HTTP |
817 | 823 | void PutBlobs(DynamoDBClient* client, uint32_t blobRowStartIndex) |
818 | 824 | { |
819 | 825 | Aws::String testValueColumnName = "TestBlob"; |
@@ -888,6 +894,7 @@ TEST_F(TableOperationTest, TestLimiter) |
888 | 894 | // |
889 | 895 | // auto secondsElapsed2 = std::chrono::duration_cast<std::chrono::seconds>(timeDifference2); |
890 | 896 | } |
| 897 | +#endif // !AWS_SDK_USE_CRT_HTTP |
891 | 898 |
|
892 | 899 | TEST_F(TableOperationTest, TestAttributeValues) |
893 | 900 | { |
@@ -1568,11 +1575,11 @@ TEST_F(TableOperationTest, TestWriteDataApi) { |
1568 | 1575 | auto body = Aws::MakeShared<Aws::StringStream>(ALLOCATION_TAG); |
1569 | 1576 | *body << payload; |
1570 | 1577 | request->AddContentBody(body); |
1571 | | - request->SetContentLength(std::to_string(payload.size())); |
| 1578 | + request->SetContentLength(Aws::Utils::StringUtils::to_string(payload.size())); |
1572 | 1579 |
|
1573 | 1580 | // Sign the request |
1574 | 1581 | auto credProvider = Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG); |
1575 | | - Aws::Client::AWSAuthV4Signer signer(credProvider, "dynamodb", Aws::Region::US_EAST_1); |
| 1582 | + Aws::Client::AWSAuthV4Signer signer(credProvider, "dynamodb", config.region); |
1576 | 1583 | ASSERT_TRUE(signer.SignRequest(*request)); |
1577 | 1584 |
|
1578 | 1585 | // Acquire connection and create stream |
|
0 commit comments