Skip to content

Commit 1568459

Browse files
committed
remove AUTHSOURCE: thisDB, remove logs
1 parent 8b2a810 commit 1568459

File tree

12 files changed

+34
-33
lines changed

12 files changed

+34
-33
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26565,7 +26565,6 @@ tasks:
2656526565
SSL: ssl
2656626566
TOPOLOGY: sharded_cluster
2656726567
VERSION: '5.0'
26568-
AUTHSOURCE: thisDB
2656926568
- func: clone drivers-evergreen-tools
2657026569
- func: start load balancer
2657126570
vars:
@@ -26593,7 +26592,6 @@ tasks:
2659326592
SSL: ssl
2659426593
TOPOLOGY: sharded_cluster
2659526594
VERSION: latest
26596-
AUTHSOURCE: thisDB
2659726595
- func: clone drivers-evergreen-tools
2659826596
- func: start load balancer
2659926597
vars:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ This will ensure that all tests declare the indicated API version when connectin
265265
To test a load balanced deployment, set the following environment variables:
266266

267267
* `MONGOC_TEST_LOADBALANCED=on`
268-
* `SINGLE_MONGOS_LB_URI=<string>` to a load balancer fronting one mongos.
269-
* `MULTI_MONGOS_LB_URI=<string>` to a load balancer fronting multiple mongos processes.
268+
* `SINGLE_MONGOS_LB_URI=<string>` to a MongoDB URI with a host of a load balancer fronting one mongos.
269+
* `MULTI_MONGOS_LB_URI=<string>` to a MongoDB URI with a host of a load balancer fronting multiple mongos processes.
270270

271271
All tests should pass before submitting a patch.
272272

build/evergreen_config_lib/tasks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,6 @@ def to_dict(self):
11281128
AUTH='auth' if self.test_auth else 'noauth',
11291129
SSL='ssl' if self.test_ssl else 'nossl',
11301130
VERSION=self.version)
1131-
if self.test_auth:
1132-
orchestration['vars']['AUTHSOURCE'] = 'thisDB'
11331131
commands.append(orchestration)
11341132
commands.append (func("clone drivers-evergreen-tools"))
11351133
commands.append (func("start load balancer",

src/libmongoc/src/mongoc/mongoc-server-description.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ mongoc_server_description_handle_hello (mongoc_server_description_t *sd,
737737
}
738738
}
739739

740-
740+
741741
if (global_mock_service_id) {
742742
bson_iter_t pid_iter;
743743

src/libmongoc/tests/json-test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,6 @@ check_version_info (const bson_t *scenario, bool print_reason)
784784

785785
/* Determine cluster type */
786786
if (test_framework_is_loadbalanced()) {
787-
MONGOC_DEBUG ("TOPOLOGY detected as load-balanced from env variable");
788787
current_topology = "load-balanced";
789788
} else if (test_framework_is_mongos ()) {
790789
current_topology = "sharded";
@@ -1744,7 +1743,6 @@ run_json_general_test (const json_test_config_t *config)
17441743
}
17451744

17461745
client = test_framework_client_new_from_uri (uri, NULL);
1747-
MONGOC_DEBUG ("client is using uri: %s", mongoc_uri_get_string (uri));
17481746
mongoc_client_set_error_api (client, MONGOC_ERROR_API_VERSION_2);
17491747
test_framework_set_ssl_opts (client);
17501748
/* reconnect right away, if a fail point causes a disconnect */

src/libmongoc/tests/json-test.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ typedef struct _json_test_config_t {
4444
bool command_started_events_only;
4545
bool command_monitoring_allow_subset;
4646
const char *uri_str;
47-
/* skips is a NULL terminated list of tests to skip identified by the test "description" */
47+
/* skips is a NULL terminated list of tests to skip identified by the test
48+
* "description" */
4849
test_skip_t *skips;
4950
} json_test_config_t;
5051

5152

52-
#define JSON_TEST_CONFIG_INIT \
53-
{ \
53+
#define JSON_TEST_CONFIG_INIT \
54+
{ \
5455
NULL, NULL, NULL, NULL, NULL, NULL, false, false, NULL, NULL \
5556
}
5657

src/libmongoc/tests/test-mongoc-retryable-writes.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ retryable_writes_test_run_operation (json_test_ctx_t *ctx,
3333

3434

3535
static test_skip_t skips[] = {
36-
{"InsertOne fails after multiple retryable writeConcernErrors", "Waiting on CDRIVER-3790" },
37-
{0, 0}
38-
};
36+
{"InsertOne fails after multiple retryable writeConcernErrors",
37+
"Waiting on CDRIVER-3790"},
38+
{0, 0}};
3939

4040
/* Callback for JSON tests from Retryable Writes Spec */
4141
static void
@@ -127,7 +127,8 @@ test_rs_failover (void)
127127

128128

129129
/* Test code paths for _mongoc_client_command_with_opts.
130-
* This test requires a 3.6+ replica set to support the onPrimaryTransactionalWrite failpoint. */
130+
* This test requires a 3.6+ replica set to support the
131+
* onPrimaryTransactionalWrite failpoint. */
131132
static void
132133
test_command_with_opts (void *ctx)
133134
{

src/libmongoc/tests/unified/entity-map.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ entity_map_add_changestream (entity_map_t *em,
11511151
em, id, "changestream", (void *) changestream, error);
11521152
}
11531153

1154-
bool
1154+
void
11551155
entity_findcursor_iterate_until_document_or_error (
11561156
entity_findcursor_t *findcursor,
11571157
const bson_t **document,
@@ -1163,16 +1163,15 @@ entity_findcursor_iterate_until_document_or_error (
11631163
if (findcursor->first_result) {
11641164
*document = findcursor->first_result;
11651165
findcursor->first_result = NULL;
1166-
return true;
1166+
return;
11671167
}
11681168

11691169
while (!mongoc_cursor_next (findcursor->cursor, document)) {
11701170
if (mongoc_cursor_error_document (
11711171
findcursor->cursor, error, error_document)) {
1172-
return false;
1172+
return;
11731173
}
11741174
}
1175-
return true;
11761175
}
11771176

11781177
bool

src/libmongoc/tests/unified/entity-map.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ typedef struct _entity_t {
4848
struct _entity_findcursor_t;
4949
typedef struct _entity_findcursor_t entity_findcursor_t;
5050

51-
bool
52-
entity_findcursor_iterate_until_document_or_error (
53-
entity_findcursor_t *cursor,
54-
const bson_t **document,
55-
bson_error_t *error,
56-
const bson_t **error_document);
57-
5851
/* Operations on the entity map enforce:
5952
* 1. Uniqueness. Attempting to create two entries with the same id is an error.
6053
* 2. Referential integrity. Attempting to get with an unknown id is an error.
@@ -131,6 +124,13 @@ entity_map_get_findcursor (entity_map_t *entity_map,
131124
const char *id,
132125
bson_error_t *error);
133126

127+
void
128+
entity_findcursor_iterate_until_document_or_error (
129+
entity_findcursor_t *cursor,
130+
const bson_t **document,
131+
bson_error_t *error,
132+
const bson_t **error_document);
133+
134134
mongoc_client_session_t *
135135
entity_map_get_session (entity_map_t *entity_map,
136136
const char *id,

src/libmongoc/tests/unified/operation.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ operation_count_documents (test_t *test,
688688
}
689689

690690
static bool
691-
operation_create_findcursor (test_t *test,
691+
operation_create_find_cursor (test_t *test,
692692
operation_t *op,
693693
result_t *result,
694694
bson_error_t *error)
@@ -2533,7 +2533,8 @@ operation_assert_number_connections_checked_out (test_t *test,
25332533
bson_error_t *error)
25342534
{
25352535
/* "This operation only applies to drivers that implement connection pooling
2536-
* and should be skipped for drivers that do not." */
2536+
* and should be skipped for drivers that do not."
2537+
* TODO: (CDRIVER-3525) add this assertion when CMAP is implemented. */
25372538
result_from_ok (result);
25382539
return true;
25392540
}
@@ -2567,7 +2568,7 @@ operation_run (test_t *test, bson_t *op_bson, bson_error_t *error)
25672568
{"aggregate", operation_aggregate},
25682569
{"bulkWrite", operation_bulk_write},
25692570
{"countDocuments", operation_count_documents},
2570-
{"createFindCursor", operation_create_findcursor},
2571+
{"createFindCursor", operation_create_find_cursor},
25712572
{"createIndex", operation_create_index},
25722573
{"deleteOne", operation_delete_one},
25732574
{"deleteMany", operation_delete_many},

src/libmongoc/tests/unified/runner.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ skipped_unified_test_t SKIPPED_TESTS[] = {
7373
{"assertNumberConnectionsCheckedOut", SKIP_ALL_TESTS},
7474
{"entity-client-cmap-events", SKIP_ALL_TESTS},
7575
{"expectedEventsForClient-eventType", SKIP_ALL_TESTS},
76-
/* CDRIVER-????: File a ticket to support batchSize on listCollections and listIndexes. Prefer this waits until a cursor specification (DRIVERS-722). */
76+
/* CDRIVER-4115: listCollections does not support batchSize. */
7777
{"cursors are correctly pinned to connections for load-balanced clusters", "listCollections pins the cursor to a connection"},
78+
/* CDRIVER-4116: listIndexes does not support batchSize. */
7879
{"cursors are correctly pinned to connections for load-balanced clusters", "listIndexes pins the cursor to a connection"},
7980
/* libmongoc does not pin connections to cursors. It cannot force an error from waitQueueTimeoutMS by creating cursors in load balanced mode. */
8081
{"wait queue timeout errors include details about checked out connections", SKIP_ALL_TESTS},
@@ -381,7 +382,7 @@ test_runner_new (void)
381382
/* In load balanced mode, the internal client must use the SINGLE_LB_MONGOS_URI. */
382383
if (!test_framework_is_loadbalanced ()) {
383384
/* Always use multiple mongos's if speaking to a mongos.
384-
* Some test operations require communicating with all known mongos */
385+
* Some test operations require communicating with all known mongos */
385386
if (!test_framework_uri_apply_multi_mongos (uri, true, &error)) {
386387
test_error ("error applying multiple mongos: %s", error.message);
387388
}
@@ -1146,7 +1147,8 @@ test_check_expected_events_for_client (test_t *test,
11461147

11471148
if (event_type) {
11481149
if (0 == strcmp (event_type, "cmap")) {
1149-
/* Explicitly ignore cmap events. These are unsupported by the C driver */
1150+
/* TODO: (CDRIVER-3525) Explicitly ignore cmap events until CMAP is
1151+
* supported. */
11501152
ret = true;
11511153
goto done;
11521154
} else if (0 == strcmp (event_type, "command")) {
@@ -1609,6 +1611,7 @@ run_one_test_file (bson_t *bson)
16091611
test_file = test_file_new (test_runner, bson);
16101612

16111613
test_diagnostics_test_info ("test file: %s", test_file->description);
1614+
16121615
if (is_test_file_skipped (test_file)) {
16131616
MONGOC_DEBUG (
16141617
"SKIPPING test file '%s'. Reason: 'explicitly skipped in runner.c'",

src/libmongoc/tests/unified/util.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ test_bson_util_install (TestSuite *suite)
164164
suite, "/unified/selftest/util/copy_and_sort", test_copy_and_sort);
165165
}
166166

167+
/* TODO (CDRIVER-3525) add test support for CMAP events once the C driver
168+
* supports CMAP. */
167169
bool is_unsupported_event_type (const char* event_type) {
168170
char * unsupported_event_types[] = {
169171
"poolCreatedEvent",

0 commit comments

Comments
 (0)