Skip to content

Commit ef7d3c5

Browse files
committed
refined test consistency
1 parent 89bfa4d commit ef7d3c5

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/Integration/ConsistencyTest.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testConsistencyMultiple(): void
7272
{
7373
$aliases = $this->connectionAliases();
7474
$tsxs = [];
75-
for ($i = 0; $i < 1000; ++$i) {
75+
for ($i = 0; $i < 200; ++$i) {
7676
$alias = $aliases[$i % count($aliases)][0];
7777
if ($i % 2 === 0) {
7878
$tsx = $this->client->beginTransaction(null, $alias);
@@ -83,9 +83,15 @@ public function testConsistencyMultiple(): void
8383
}
8484

8585
self::assertEquals(1, $x);
86-
if ($i % 50 === 9) {
87-
for ($j = 0; $j < 24; ++$j) {
88-
array_pop($tsxs);
86+
if ($i % 20 === 19) {
87+
$x = $tsx->run('RETURN 1 AS x')->first()->get('x');
88+
self::assertEquals(1, $x);
89+
for ($j = 0; $j < 9; ++$j) {
90+
$tsx = array_pop($tsxs);
91+
92+
if ($j % 2 === 0) {
93+
$tsx->commit();
94+
}
8995
}
9096
}
9197
}

0 commit comments

Comments
 (0)