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));
1515$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
1616$ result = current ($ cursor ->toArray ());
1717
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 ' ));
2119
2220$ command = new MongoDB \Driver \Command (array (
2321 'aggregate ' => COLLECTION_NAME ,
@@ -44,14 +42,13 @@ $command = new MongoDB\Driver\Command(array('profile' => 0));
4442$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
4543$ result = current ($ cursor ->toArray ());
4644
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 ' ));
5046
5147?>
5248===DONE===
5349<?php exit (0 ); ?>
5450--EXPECTF--
51+ Set profile level to 2 successfully: yes
5552object(stdClass)#%d (%d) {
5653 ["aggregate"]=>
5754 string(32) "server_server_executeCommand_002"
@@ -75,4 +72,5 @@ object(stdClass)#%d (%d) {
7572 }
7673 }
7774}
75+ Set profile level to 0 successfully: yes
7876===DONE===
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ $command = new MongoDB\Driver\Command(array('profile' => 2));
1515$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
1616$ result = current ($ cursor ->toArray ());
1717
18+ printf ("Set profile level to 2 successfully: %s \n" , (empty ($ result ->ok ) ? 'no ' : 'yes ' ));
19+
1820if (empty ($ result ->ok )) {
1921 exit ("Could not set profile level \n" );
2022}
@@ -40,14 +42,13 @@ $command = new MongoDB\Driver\Command(array('profile' => 0));
4042$ cursor = $ secondary ->executeCommand (DATABASE_NAME , $ command );
4143$ result = current ($ cursor ->toArray ());
4244
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 ' ));
4646
4747?>
4848===DONE===
4949<?php exit (0 ); ?>
5050--EXPECTF--
51+ Set profile level to 2 successfully: yes
5152object(stdClass)#%d (%d) {
5253 ["$query"]=>
5354 object(stdClass)#%d (%d) {
@@ -63,4 +64,5 @@ object(stdClass)#%d (%d) {
6364 }
6465 }
6566}
67+ Set profile level to 0 successfully: yes
6668===DONE===
You can’t perform that action at this time.
0 commit comments