Skip to content

Commit bfd0f31

Browse files
committed
complete sfn test suite
1 parent 5558ad5 commit bfd0f31

File tree

3 files changed

+43
-10
lines changed

3 files changed

+43
-10
lines changed

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/awssdk/base/AwsSdkBaseTest.java

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,7 +2451,7 @@ protected void doTestStepFunctionsDescribeActivity() throws Exception {
24512451
0.0);
24522452
}
24532453

2454-
protected void doTestStepFunctionsDescribeActivityError() throws Exception {
2454+
protected void doTestStepFunctionsError() throws Exception {
24552455
appClient.get("/sfn/error").aggregate().join();
24562456
var traces = mockCollectorClient.getTraces();
24572457
var metrics = mockCollectorClient.getMetrics(
@@ -2519,7 +2519,7 @@ protected void doTestStepFunctionsDescribeActivityError() throws Exception {
25192519
1.0);
25202520
}
25212521

2522-
protected void doTestStepFunctionsDescribeActivityFault() throws Exception {
2522+
protected void doTestStepFunctionsFault() throws Exception {
25232523
appClient.get("/sfn/fault").aggregate().join();
25242524
var traces = mockCollectorClient.getTraces();
25252525
var metrics = mockCollectorClient.getMetrics(
@@ -2553,5 +2553,38 @@ protected void doTestStepFunctionsDescribeActivityFault() throws Exception {
25532553
assertAttribute(
25542554
SemanticConventionsConstants.AWS_ACTIVITY_ARN,
25552555
"arn:aws:states:us-west-2:000000000000:activity:fault-activity")));
2556+
assertMetricClientAttributes(
2557+
metrics,
2558+
AppSignalsConstants.LATENCY_METRIC,
2559+
localService,
2560+
localOperation,
2561+
getStepFunctionsServiceName(),
2562+
"DescribeActivity",
2563+
type,
2564+
identifier,
2565+
cloudformationIdentifier,
2566+
5000.0);
2567+
assertMetricClientAttributes(
2568+
metrics,
2569+
AppSignalsConstants.FAULT_METRIC,
2570+
localService,
2571+
localOperation,
2572+
getStepFunctionsServiceName(),
2573+
"DescribeActivity",
2574+
type,
2575+
identifier,
2576+
cloudformationIdentifier,
2577+
1.0);
2578+
assertMetricClientAttributes(
2579+
metrics,
2580+
AppSignalsConstants.ERROR_METRIC,
2581+
localService,
2582+
localOperation,
2583+
getStepFunctionsServiceName(),
2584+
"DescribeActivity",
2585+
type,
2586+
identifier,
2587+
cloudformationIdentifier,
2588+
0.0);
25562589
}
25572590
}

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/awssdk/v1/AwsSdkV1Test.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ void testStepFunctionsDescribeActivity() throws Exception {
272272
}
273273

274274
@Test
275-
void testStepFunctionsDescribeActivityError() throws Exception {
276-
doTestStepFunctionsDescribeActivityError();
275+
void testStepFunctionsError() throws Exception {
276+
doTestStepFunctionsError();
277277
}
278278

279279
@Test
280-
void testStepFunctionsDescribeActivityFault() throws Exception {
281-
doTestStepFunctionsDescribeActivityFault();
280+
void testStepFunctionsFault() throws Exception {
281+
doTestStepFunctionsFault();
282282
}
283283
}

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/awssdk/v2/AwsSdkV2Test.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,12 @@ void testStepFunctionsDescribeActivity() throws Exception {
277277
}
278278

279279
@Test
280-
void testStepFunctionsDescribeActivityError() throws Exception {
281-
doTestStepFunctionsDescribeActivityError();
280+
void testStepFunctionsError() throws Exception {
281+
doTestStepFunctionsError();
282282
}
283283

284284
@Test
285-
void testStepFunctionsDescribeActivityFault() throws Exception {
286-
doTestStepFunctionsDescribeActivityFault();
285+
void testStepFunctionsFault() throws Exception {
286+
doTestStepFunctionsFault();
287287
}
288288
}

0 commit comments

Comments
 (0)