File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 6
6
use MongoDB \Client ;
7
7
use MongoDB \Database ;
8
8
use MongoDB \Driver \Cursor ;
9
+ use MongoDB \Driver \ReadPreference ;
9
10
use MongoDB \Driver \Server ;
10
11
use MongoDB \Driver \WriteConcern ;
12
+ use MongoDB \Driver \Exception \ConnectionTimeoutException ;
11
13
use MongoDB \Operation \DropCollection ;
12
14
13
15
/**
@@ -1412,6 +1414,12 @@ function testCausalConsistency()
1412
1414
{
1413
1415
$ this ->skipIfCausalConsistencyIsNotSupported ();
1414
1416
1417
+ try {
1418
+ $ this ->manager ->selectServer (new ReadPreference ('secondary ' ));
1419
+ } catch (ConnectionTimeoutException $ e ) {
1420
+ $ this ->markTestSkipped ('Secondary is not available ' );
1421
+ }
1422
+
1415
1423
// Prep
1416
1424
$ client = new Client (static ::getUri ());
1417
1425
$ items = $ client ->selectDatabase (
You can’t perform that action at this time.
0 commit comments