File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,7 @@ $command = new MongoDB\Driver\Command(array('profile' => 2));
15
15
$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
16
16
$ result = current ($ cursor ->toArray ());
17
17
18
- if (empty ($ result ->ok )) {
19
- exit ("Could not set profile level \n" );
20
- }
18
+ printf ("Set profile level to 2 successfully: %s \n" , (empty ($ result ->ok ) ? 'no ' : 'yes ' ));
21
19
22
20
$ command = new MongoDB \Driver \Command (array (
23
21
'aggregate ' => COLLECTION_NAME ,
@@ -44,14 +42,13 @@ $command = new MongoDB\Driver\Command(array('profile' => 0));
44
42
$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
45
43
$ result = current ($ cursor ->toArray ());
46
44
47
- if (empty ($ result ->ok )) {
48
- exit ("Could not set profile level \n" );
49
- }
45
+ printf ("Set profile level to 0 successfully: %s \n" , (empty ($ result ->ok ) ? 'no ' : 'yes ' ));
50
46
51
47
?>
52
48
===DONE===
53
49
<?php exit (0 ); ?>
54
50
--EXPECTF--
51
+ Set profile level to 2 successfully: yes
55
52
object(stdClass)#%d (%d) {
56
53
["aggregate"]=>
57
54
string(32) "server_server_executeCommand_002"
@@ -75,4 +72,5 @@ object(stdClass)#%d (%d) {
75
72
}
76
73
}
77
74
}
75
+ Set profile level to 0 successfully: yes
78
76
===DONE===
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ $command = new MongoDB\Driver\Command(array('profile' => 2));
15
15
$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
16
16
$ result = current ($ cursor ->toArray ());
17
17
18
+ printf ("Set profile level to 2 successfully: %s \n" , (empty ($ result ->ok ) ? 'no ' : 'yes ' ));
19
+
18
20
if (empty ($ result ->ok )) {
19
21
exit ("Could not set profile level \n" );
20
22
}
@@ -40,14 +42,13 @@ $command = new MongoDB\Driver\Command(array('profile' => 0));
40
42
$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
41
43
$ result = current ($ cursor ->toArray ());
42
44
43
- if (empty ($ result ->ok )) {
44
- exit ("Could not set profile level \n" );
45
- }
45
+ printf ("Set profile level to 0 successfully: %s \n" , (empty ($ result ->ok ) ? 'no ' : 'yes ' ));
46
46
47
47
?>
48
48
===DONE===
49
49
<?php exit (0 ); ?>
50
50
--EXPECTF--
51
+ Set profile level to 2 successfully: yes
51
52
object(stdClass)#%d (%d) {
52
53
["$query"]=>
53
54
object(stdClass)#%d (%d) {
@@ -63,4 +64,5 @@ object(stdClass)#%d (%d) {
63
64
}
64
65
}
65
66
}
67
+ Set profile level to 0 successfully: yes
66
68
===DONE===
You can’t perform that action at this time.
0 commit comments