19 Commits

Author SHA1 Message Date
Jeremy Mikola f9fe7efe03 PHPC-1985: Report unset round_trip_time as null in Server debug output (#1265) 2021-10-15 15:32:45 -04:00
Jeremy Mikola ae74c7a1cd PHPC-1752: Fix tests for load balanced topologies
Skip tests expecting gossiped $clusterTime on first command. This may be a bug in libmongoc, per CDRIVER-4174.

Make exception assertion in TLS tests more flexible. Expect parent ConnectionException to accomodate load balanced clients, which do not use server selection. Both exception messages will include a common prefix from libmongoc.

Do not assert exception message for failed TLS connection. While the message will typically include "TLS handshake failed", that is not guaranteed.

Make ping response assertions in TLS tests more flexible. Sharded clusters and replica sets may return additional fields in the ping response (e.g. cluster time). These tests were originally written to expect a standalone response.

Allow unset RTT (-1) for load balanced client.

Note SRV caveat for is_replica_set test function.

Allow load balancers for tests that require sharded clusters. Load balancers should always proxy a mongos, so existing skip functions that check for mongos can now allow a load balancer. If there is some incompatibility specific to LBs, we can address that later with a LB-specific skip function.

Require mongos for pinning tests. Pinning does not apply to load balanced clients, since there is only one connection.
2021-10-15 13:44:32 -04:00
Tanli Su 0aadc0e891 Clean up server-debug.phpt (#1242) 2021-07-30 17:29:58 -04:00
Andreas Braun a612c370f6 PHPC-1756: Remove oppressive terminology from source code (#1221)
* Use latest version of libmongoc

* Remove deprecated terminology for primary

* Remove deprecated terminology for secondary

* Fix clang-format

* Remove check for legacy field

* Fix missing space in error expectation

* Harden test expectation around primary checks
2021-06-22 19:30:56 +02:00
Andreas Braun deead9687e PHPC-1716 Allow configuring server API version in manager (#1204)
* Introduce MongoDB\Driver\ServerApi

* Accept serverApi driver option

* Introduce create_test_manager factory to create manager

A centralised entry point is required to inject the API_VERSION env variable later.

* Add build variant to test with requireApiVersion=true

* Fix wrong configuration for auth variable

This changed when migrating from our own scripts to drivers-evergreen-tools and was not updated properly, causing all tests to run with auth disabled.

* Declare ZEND_PARSE_PARAMETERS_NONE macro

This macro is missing on PHP < 7.3

* Remove duplicated API param storage

* Add missing semicolons

* Add ZEND_PARSE_PARAMETERS_NON_EX macro

* Extract error handling functionality to separate macros

* Throw if internal mongoc_server_api_t is already initialised

* Use imported namespaces in tools file

* Fix type info for reflection

* Use American English spelling

* Only use typed serialize signature on PHP 8+

* Update PHONGO_PARSE_PARAMETERS_NONE macro for PHP < 7.3

* Remove usage of ZEND_STRL within zend_hash_str_add

This causes compile failures on PHP < 7.3 that I have yet to understand.

* Fix errors in new PHONGO_PARSE_PARAMETERS macros
2021-03-26 15:43:48 +01:00
Jeremy Mikola fc8b862c09 PHPC-1113: Allow extra output for replica sets 2018-05-02 16:45:02 -04:00
Jeremy Mikola f79a626d86 Fix test titles 2018-05-02 16:39:53 -04:00
Jeremy Mikola 58fa85e85e PHPC-1113: Use common URI constant 2018-05-02 16:04:09 -04:00
Jeremy Mikola 5f7f350670 PHPC-1113: Replace NEEDS('STANDALONE') with skip function 2018-05-02 16:04:08 -04:00
Jeremy Mikola b4062f880c PHPC-1113: Replace CLEANUP() with skip function 2018-05-02 16:04:08 -04:00
Derick Rethans 5a00dcead0 PHPC-1036: Update test suite for MongoDB 3.6 2017-11-13 18:09:21 +00:00
Jeremy Mikola e6b8479506 Reorganize SKIPIF blocks in tests and add missing NEEDS() checks 2017-03-15 10:41:04 -04:00
Derick Rethans 39044213f3 Fixed tests, as MongoDB 3.3 adds an extra item 2016-08-31 18:11:53 +01:00
Jeremy Mikola 57871d1f4b PHPC-340: BSON\UTCDateTime debug handler
The milliseconds will be dumped as a string value on 32-bit platforms.
2015-08-26 15:57:08 -04:00
Derick Rethans ae0cfeae20 Allow for PHONGO-SERVERS.json in ~ (and fix a test case name) 2015-08-19 16:56:19 +01:00
Hannes Magnusson 808ee36ca8 PHPC-321: UTCDatetime -> UTCDateTime 2015-06-30 10:30:27 -07:00
Hannes Magnusson ed1cd1e30b PHPC-309: Bump tests 2015-06-30 10:04:36 -07:00
Hannes Magnusson 0a778441cf Fix test on travis 2015-05-13 19:28:44 -07:00
Hannes Magnusson c09dc2ff4d PHPC-300: Add var_dump() debug info for Server 2015-05-13 18:38:03 -07:00