Skip to content

Commit 9bd8b63

Browse files
chore: adjust assertion to match new behavior
- Adjust assertion to match new behavior - Rename test cases
1 parent 1d19c7d commit 9bd8b63

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

tests/DynamoDb/DynamoDbClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ public function testValidatesAndRetriesCrc32()
164164
];
165165

166166
$handler = function ($request, $options) use (&$queue) {
167-
// Test the custom retry policy.
167+
// On retry, verify delay is within DynamoDB's 25ms base backoff range
168168
if (count($queue) == 1) {
169-
$this->assertSame(0, $options['delay']);
169+
$this->assertLessThanOrEqual(25, $options['delay']);
170170
}
171171

172172
return \GuzzleHttp\Promise\Create::promiseFor(array_shift($queue));

tests/RetryMiddlewareV2Test.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,13 +1152,11 @@ public function testReportsHttpStatsForEachRequestEvenIfRetryStatsDisabled()
11521152
], $httpStats);
11531153
}
11541154

1155-
// ---- New spec-based tests ----
1156-
11571155
/**
1158-
* Tests spec-based standard mode behavior with deterministic jitter.
1156+
* Tests standard mode behavior with deterministic jitter.
11591157
*/
1160-
#[DataProvider('specStandardModeTestCases')]
1161-
public function testSpecStandardMode(
1158+
#[DataProvider('standardModeNewTestCasesProvider')]
1159+
public function testStandardModeRetry(
11621160
array $config,
11631161
array $responseSequence,
11641162
array $expectedOutcomes
@@ -1229,7 +1227,7 @@ public function testSpecStandardMode(
12291227
}
12301228
}
12311229

1232-
public static function specStandardModeTestCases(): array
1230+
public static function standardModeNewTestCasesProvider(): array
12331231
{
12341232
return [
12351233
'Retry eventually succeeds' => [

0 commit comments

Comments
 (0)