Skip to content

Commit b45a519

Browse files
committed
Added getMore failpoint skip_if
1 parent 8ece2a3 commit b45a519

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

tests/cursor/cursor-getmore-005.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ MongoDB\Driver\Cursor query result iteration with getmore failure
77
* auth" configurations. This way, we can test on multiple server versions, but not waste resources
88
* on f.e. Travis. */
99
?>
10+
<?php skip_if_not_live(); ?>
1011
<?php skip_if_not_standalone(); ?>
12+
<?php skip_if_no_getmore_failpoint(); ?>
1113
<?php skip_if_auth(); ?>
1214
--FILE--
1315
<?php

tests/cursor/cursor-getmore-006.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ MongoDB\Driver\Cursor command result iteration with getmore failure
77
* auth" configurations. This way, we can test on multiple server versions, but not waste resources
88
* on f.e. Travis. */
99
?>
10+
<?php skip_if_not_live(); ?>
1011
<?php skip_if_not_standalone(); ?>
12+
<?php skip_if_no_getmore_failpoint(); ?>
1113
<?php skip_if_auth(); ?>
1214
--FILE--
1315
<?php

tests/utils/skipif.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,15 @@ function skip_if_not_clean($databaseName = DATABASE_NAME, $collectionName = COLL
226226
exit("skip Could not drop '$databaseName.$collectionName': " . $e->getMessage());
227227
}
228228
}
229+
230+
function skip_if_no_getmore_failpoint()
231+
{
232+
$serverVersion = get_server_version(URI);
233+
234+
if (
235+
version_compare($serverVersion, '3.2', '>=') &&
236+
version_compare($serverVersion, '4.0', '<')
237+
) {
238+
exit("skip Server version '$serverVersion' does not support a getMore failpoint'");
239+
}
240+
}

0 commit comments

Comments
 (0)