Skip to content

Commit 2948eb7

Browse files
committed
Add some logging on failed attemps
1 parent cacd54d commit 2948eb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: tests/Common/IntegrationTestCase.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ abstract class IntegrationTestCase extends BaseTestCase
1919
public static $database = "test";
2020
private static $createdDatabases = ["test" => true];
2121

22-
protected static $maxRetries = 3;
22+
protected static $maxRetries = 5;
2323

2424
public static function ddSetUpBeforeClass()
2525
{
@@ -124,8 +124,11 @@ protected function retryTest(callable $testCase, ...$args)
124124
$testCase(...$args);
125125
return; // Test passed, exit the loop.
126126
} catch (\Throwable $e) {
127+
echo "Attempt $attempts failed: " . $e->getMessage() . PHP_EOL;
128+
echo "Retrying..." . PHP_EOL;
127129
$attempts++;
128130
if ($attempts >= self::$maxRetries) {
131+
echo "Max retries reached." . PHP_EOL;
129132
throw $e; // Re-throw after max retries.
130133
}
131134
}

0 commit comments

Comments
 (0)