refactor(test): narrow Lambda dispatch probe to transport-level exceptions (#395)

* refactor: narrow exception handling to transport-level failures only

The broad catch(Exception) in the Lambda dispatch probe and warmup
swallowed all errors, masking real service regressions as skipped tests.
Narrow to specific transport-level exceptions so only environment
unavailability (timeout, connection refused) triggers a skip:

- Java probe: SdkClientException + ConnectException (not all Exception)
- APIGW warmup: HttpTimeoutException + ConnectException
- Go invoke: net.Error via errors.As (not any error)

Unexpected service errors now propagate as test failures.

* fix: remove unreachable ConnectException catch in lambda probe

AWS SDK wraps all transport-level failures (ConnectException,
ApiCallTimeoutException, etc.) in SdkClientException, so the
separate ConnectException catch was unreachable and broke compilation.

* fix(compat): use unique_name in s3-notifications.bats to avoid parallel collisions

Parallel bats workers could share the same $(date +%s) timestamp,
producing identical bucket/queue/topic names. One worker's
put-bucket-notification-configuration would overwrite another's,
and the round-trip read would return zero filter rules. Switch to
unique_name which appends the shell PID.

* fix(compat): use unique_name in kms and ses bats to avoid parallel collisions

Same class of flake as s3-notifications.bats. Under --jobs 4, parallel
bats workers sharing a $(date +%s) timestamp produce identical alias
names (kms) and identity names (ses), causing cross-worker interference.
This commit is contained in:
TiM authored and GitHub committed 2026-04-13 21:49:26 -05:00
1 parent 467f5e0f79
commit 38eb0125a9
6 files changed
+27 -16

No files matched your search

@@ -172,7 +172,8 @@ class ApiGatewayV2ExecuteTest {
JsonNode warmupBody = JSON.readTree(warmup.body());
lambdaDispatchAvailable = warmup.statusCode() == 200
&& warmupBody.path("statusCode").asInt() == 200;
} catch (Exception e) {
} catch (java.net.http.HttpTimeoutException | ConnectException e) {
// Transport-level failure: endpoint unreachable or timed out
lambdaDispatchAvailable = false;
}
}