Skip to content

Commit 7e895d5

Browse files
committed
Require REPLICASET test environment before using its constant
1 parent 9ca935d commit 7e895d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/writeResult/writeresult-debug-002.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
--TEST--
22
MongoDB\Driver\WriteResult debug output with errors
33
--SKIPIF--
4-
<?php require __DIR__ . "/../utils/basic-skipif.inc"; CLEANUP(REPLICASET); ?>
4+
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
5+
<?php NEEDS("REPLICASET"); CLEANUP(REPLICASET); ?>
56
--FILE--
67
<?php
78
require_once __DIR__ . "/../utils/basic.inc";
@@ -19,6 +20,7 @@ $bulk->insert(['_id' => 3]);
1920
$bulk->insert(['_id' => 3]);
2021

2122
try {
23+
/* We assume that the replica set does not have 30 nodes */
2224
$result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(30));
2325
} catch (MongoDB\Driver\Exception\BulkWriteException $e) {
2426
var_dump($e->getWriteResult());

0 commit comments

Comments
 (0)