Skip to content

Commit 4da907d

Browse files
committed
CDRIVER-2790 fix comments
1 parent 77a452e commit 4da907d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/libmongoc/tests/test-mongoc-sample-commands.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,9 +2679,9 @@ test_sample_causal_consistency (mongoc_client_t *client)
26792679
goto cleanup;
26802680
}
26812681

2682-
/* Example 1:
2683-
* ----------
2684-
* Use a causally-consistent session to run some operations. */
2682+
/* Start Causal Consistency Example 1 */
2683+
2684+
/* Use a causally-consistent session to run some operations. */
26852685

26862686
wc = mongoc_write_concern_new ();
26872687
mongoc_write_concern_set_wmajority (wc, 1000);
@@ -2700,7 +2700,7 @@ test_sample_causal_consistency (mongoc_client_t *client)
27002700
goto cleanup;
27012701
}
27022702

2703-
/* Run an update_one with our causally-consistent session */
2703+
/* Run an update_one with our causally-consistent session. */
27042704
update_opts = bson_new ();
27052705
res = mongoc_client_session_append (session1, update_opts, &error);
27062706
if (!res) {
@@ -2739,11 +2739,12 @@ test_sample_causal_consistency (mongoc_client_t *client)
27392739
goto cleanup;
27402740
}
27412741

2742-
/* Example 2:
2743-
* ----------
2744-
* Make a new session, session2, and make it causally-consistent
2745-
* with session1, so that session2 will read session1's writes. */
2742+
/* End Causal Consistency Example 1 */
2743+
2744+
/* Start Causal Consistency Example 2 */
27462745

2746+
/* Make a new session, session2, and make it causally-consistent
2747+
* with session1, so that session2 will read session1's writes. */
27472748
session2 = mongoc_client_start_session (client, session_opts, &error);
27482749
if (!session2) {
27492750
fprintf (stderr, "couldn't start session: %s\n", error.message);
@@ -2787,6 +2788,8 @@ test_sample_causal_consistency (mongoc_client_t *client)
27872788
goto cleanup;
27882789
}
27892790

2791+
/* End Causal Consistency Example 2 */
2792+
27902793
cleanup:
27912794

27922795
bson_destroy (doc);

0 commit comments

Comments
 (0)