Repository navigation
Conversation
616c33c to
1b375c4
Compare
1b375c4 to
b4d9421
Compare
| const Aws::Vector<Aws::String> parts = Aws::Utils::StringUtils::Split(value, ','); | ||
| Aws::String joined; | ||
| for (const auto& part : parts) { | ||
| if (!joined.empty()) { |
There was a problem hiding this comment.
can you give me a example where this would be useful? what header values would cause this to happen? the method seems like all we do is split up a thing in a list of strings then re-construct it. additionally likely should use std::accumulate to accomplish this task. we do it loads of other places in the code base
There was a problem hiding this comment.
It fixes SDKAppendedGzipAfterProvidedEncoding (restJson1/restXml): the test expects custom, gzip and we send custom,gzip. Both are valid since whitespace around commas in a list header isn't significant (RFC 9110 5.6.1), so the helper normalizes it before comparing. Also switched it to std::accumulate
| } | ||
| // A Smithy vector with no "body" asserts only headers/uri, not the body. | ||
| if (!expected.body.empty()) { | ||
| if (alwaysCompareBody || !expected.body.empty()) { |
There was a problem hiding this comment.
whats the use case for adding a boolean alwaysCompareBody when bodyCompare could be no-op passed lambda?
There was a problem hiding this comment.
Moved the empty-body check into the body comparators, so they're no-ops when no body is expected, and dropped the flag. Output tests' callbacks now always run.
| @@ -22,7 +22,7 @@ mkdir "${PREFIX_DIR}/al2-install" | |||
| cd "${PREFIX_DIR}/al2-build" | |||
| CMAKE_ARGS=(-GNinja ../aws-sdk-cpp -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}/al2-install" -DBUILD_PERFORMANCE_TESTS=ON -DAWS_ENABLE_CORE_INTEGRATION_TEST=ON -DENABLE_SMOKE_TESTS=ON) | |||
| if [ "$BUILD_TYPE" = "Debug" ]; then | |||
| CMAKE_ARGS+=(-DCMAKE_CXX_FLAGS="-ggdb -fsanitize=address") | |||
| CMAKE_ARGS+=(-DCMAKE_CXX_FLAGS="-ggdb -fsanitize=address" -DENABLE_PROTOCOL_TESTS=ON) | |||
There was a problem hiding this comment.
lets talk about this offline
| done | ||
| export LD_LIBRARY_PATH | ||
| # Mock server dependency. | ||
| python3 -c 'import flask' 2>/dev/null || python3 -m pip install --user flask |
There was a problem hiding this comment.
pulling in a python dependency on flask, when we run tests shouldnt be something that happens at test time, it should be a property of the CI running it.
| @@ -18,6 +18,239 @@ | |||
| SCRIPTS_DIR = os.path.dirname(__file__) | |||
| PROTO_TEST_MOCK_HANDLER = f"{SCRIPTS_DIR}/protocol_tests_mock_server/protocol_tests_mock_server.py" | |||
|
|
|||
| # Tests that do not pass with the legacy C2J-generated clients (fail, crash or hang), per (protocol, group). | |||
There was a problem hiding this comment.
do any of these tests exhibit anything in common, would you expect any new tests to fail when addded?
There was a problem hiding this comment.
Yes, most of them fall into a few groups: limitations of the mock server (response headers, percent-decoded paths/queries, and the host forced to localhost), plus some real SDK gaps.
And yes, new tests could fail when added, but since we add them manually, we'd triage any failures at that point and update the skip list.
66af1f9 to
dd6907d
Compare
Refreshes the C2J protocol tests and adds an explicit skip list so known failures don't mask results for the rest of the suite.
Test harness (
AwsProtocolTestHelpers.h)ValidateRequestSent(callback)never ran their result assertions: that overload passes an emptyExpectedRequest, and the!expected.body.empty()guard skipped the callback. A newalwaysCompareBodyflag (set only by that overload) restores them. Input tests are unchanged.a, banda,bmatch. Note this applies to every header, also normalizes inside quoted values, and drops empty list entries (a,,b==a,b).Runner (
run_protocol_tests.py)KNOWN_FAILURES: 193 annotated entries across 12 suites, passed to gtest as a negative filter. All entries match existing test names.Test inputs / codegen
JsonEventStreamHandlerSource.vm,CppViewHelper,Shape, transformer): handlers now support header-bearing events, explicit@eventPayloadstring/structure payloads, and byte/short/integer/long/blob/timestamp headers. Regenerating all 13 real JSON event-stream services is byte-identical; only the rest-json test client gains its 4 output/duplex stream operations.protocol_tests_gen.pyfilters only input-only event-stream operations (unsupported by C2J; no AWS service models one).<cmath>/<limits>(GCC).-Werror=type-limits).Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.