Skip to content

Commit ae6016e

Browse files
committed
PHPC-605: Revise tests for libmongoc socket handling
Expected output changes now that PHP streams are no longer used for socket IO.
1 parent fc07d4a commit ae6016e

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

tests/manager/manager-debug-002.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ ini_set("mongodb.debug", "off");
2222
%a
2323
[%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s), php-%s
2424
%a
25-
[%s] PHONGO: DEBUG > Connecting to '%s:%d[mongodb://%s:%d]'
26-
%a
2725
===DONE===

tests/standalone/bug0487-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ foreach($KILLLIST as $id) {
8787
--EXPECTF--
8888
int(1)
8989
OK: Got MongoDB\Driver\Exception\RuntimeException
90-
Failed to send "insert" command with database "phongo": Failed to read 4 bytes from socket within 300000 milliseconds.
90+
Failed to send "insert" command with database "phongo": Failed to read %d bytes from socket within 300000 milliseconds.
9191
int(1)
9292
===DONE===

tests/standalone/bug0655.phpt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ $command = new MongoDB\Driver\Command(['ping' => 1]);
1212
// Invalid host cannot be resolved
1313
$manager = new MongoDB\Driver\Manager('mongodb://invalid.host:27017', ['connectTimeoutMS' => 1]);
1414

15-
ini_set('mongodb.debug', 'stderr');
16-
1715
echo throws(function() use ($manager, $command) {
1816
$manager->executeCommand(DATABASE_NAME, $command);
1917
}, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n";
@@ -25,22 +23,12 @@ echo throws(function() use ($manager, $command) {
2523
$manager->executeCommand(DATABASE_NAME, $command);
2624
}, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n";
2725

28-
ini_set('mongodb.debug', 'off');
29-
3026
?>
3127
===DONE===
3228
<?php exit(0); ?>
3329
--EXPECTF--
34-
%a
35-
[%s] PHONGO: DEBUG > Applying connectTimeoutMS: 1
36-
[%s] PHONGO: DEBUG > Connecting to 'invalid.host:27017[mongodb://invalid.host:27017]'
37-
%a
3830
OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException
3931
No suitable servers found (`serverSelectionTryOnce` set): %s
40-
%a
41-
[%s] PHONGO: DEBUG > Applying connectTimeoutMS: 1
42-
[%s] PHONGO: DEBUG > Connecting to 'localhost:54321[mongodb://localhost:54321]'
43-
%a
4432
OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException
4533
No suitable servers found (`serverSelectionTryOnce` set): %s
4634
===DONE===

0 commit comments

Comments
 (0)