Skip to content

Commit a88c1f1

Browse files
committed
(DOCSP-30169): Resolve outstanding TODOs in project (#99)
# Pull Request Info [PR Reviewing Guidelines](https://github.com/mongodb/docs-java/blob/master/REVIEWING.md) JIRA - https://jira.mongodb.org/browse/DOCSP-30169 Staging - https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/docsp-30169-todo/ ## Self-Review Checklist - [ ] Is this free of any warnings or errors in the RST? - [ ] Did you run a spell-check? - [ ] Did you run a grammar-check? - [ ] Are all the links working? (cherry picked from commit 461a79a)
1 parent 4549044 commit a88c1f1

16 files changed

+58
-58
lines changed

examples/src/test/kotlin/QueryDocumentTest.kt

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import org.junit.jupiter.api.TestInstance
1212
import java.util.*
1313
import kotlin.test.*
1414

15-
// TODO: light refactor on these examples so that they don't collect directly from find() op, but rather assign to val findFlow
16-
// and then collect/println from that for consistency with other examples
1715
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
1816
internal class QueryDocumentTest {
1917
// :snippet-start: query-data-model
@@ -67,22 +65,24 @@ internal class QueryDocumentTest {
6765
fun comparisonQueryTest() = runBlocking {
6866
// :snippet-start: comparison-filter
6967
val filter = Filters.gt("qty", 7)
70-
collection.find(filter).collect { println(it) }
68+
val findFlow = collection.find(filter)
69+
findFlow.collect { println(it) }
7170
// :snippet-end:
7271
// Junit test for the above code
7372
val expected = listOf(
7473
PaintOrder(1, 9, "red", listOf("A", "E")),
7574
PaintOrder(2, 8, "purple", listOf("B", "D", "F"), 5),
7675
PaintOrder(7, 8, "green", listOf("C", "E"), 7)
7776
)
78-
assertEquals(expected, collection.find(filter).toList() )
77+
assertEquals(expected, findFlow.toList() )
7978
}
8079

8180
@Test
8281
fun logicalQueryTest() = runBlocking {
8382
// :snippet-start: logical-filter
8483
val filter = Filters.and(Filters.lte("qty", 5), Filters.ne("color", "pink"))
85-
collection.find(filter).collect { println(it) }
84+
val findFlow = collection.find(filter)
85+
findFlow.collect { println(it) }
8686
// :snippet-end:
8787
// Junit test for the above code
8888
val expected = listOf(
@@ -96,42 +96,45 @@ internal class QueryDocumentTest {
9696
fun arrayQueryTest() = runBlocking {
9797
// :snippet-start: array-filter
9898
val filter = Filters.size("vendor", 3)
99-
collection.find(filter).collect { println(it) }
99+
val findFlow = collection.find(filter)
100+
findFlow.collect { println(it) }
100101
// :snippet-end:
101102
// Junit test for the above code
102103
val expected = listOf(
103104
PaintOrder(2, 8, "purple", listOf("B", "D", "F"), 5),
104105
PaintOrder(8, 7, "black", listOf("A", "C", "D"))
105106
)
106-
assertEquals(expected, collection.find(filter).toList() )
107+
assertEquals(expected, findFlow.toList() )
107108
}
108109

109110
@Test
110111
fun elementQueryTest() = runBlocking {
111112
// :snippet-start: element-filter
112113
val filter = Filters.exists("rating")
113-
collection.find(filter).collect { println(it) }
114+
val findFlow = collection.find(filter)
115+
findFlow.collect { println(it) }
114116
// :snippet-end:
115117
// Junit test for the above code
116118
val expected = listOf(
117119
PaintOrder(2, 8, "purple", listOf("B", "D", "F"), 5),
118120
PaintOrder(4, 6, "white", listOf("D"), 9),
119121
PaintOrder(7, 8, "green", listOf("C", "E"), 7)
120122
)
121-
assertEquals(expected, collection.find(filter).toList() )
123+
assertEquals(expected, findFlow.toList() )
122124
}
123125

124126
@Test
125127
fun evaluationQueryTest() = runBlocking {
126128
// :snippet-start: evaluation-filter
127129
val filter = Filters.regex("color", "k$")
128-
collection.find(filter).collect { println(it) }
130+
val findFlow = collection.find(filter)
131+
findFlow.collect { println(it) }
129132
// :snippet-end:
130133
// Junit test for the above code
131134
val expected = listOf(
132135
PaintOrder(6, 3, "pink", listOf("C")),
133136
PaintOrder(8, 7, "black", listOf("A", "C", "D"))
134137
)
135-
assertEquals(expected, collection.find(filter).toList() )
138+
assertEquals(expected, findFlow.toList() )
136139
}
137140
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
val filter = Filters.size("vendor", 3)
2-
collection.find(filter).collect { println(it) }
2+
val findFlow = collection.find(filter)
3+
findFlow.collect { println(it) }
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
val filter = Filters.gt("qty", 7)
2-
collection.find(filter).collect { println(it) }
2+
val findFlow = collection.find(filter)
3+
findFlow.collect { println(it) }
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
val filter = Filters.exists("rating")
2-
collection.find(filter).collect { println(it) }
2+
val findFlow = collection.find(filter)
3+
findFlow.collect { println(it) }
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
val filter = Filters.regex("color", "k$")
2-
collection.find(filter).collect { println(it) }
2+
val findFlow = collection.find(filter)
3+
findFlow.collect { println(it) }
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
val filter = Filters.and(Filters.lte("qty", 5), Filters.ne("color", "pink"))
2-
collection.find(filter).collect { println(it) }
2+
val findFlow = collection.find(filter)
3+
findFlow.collect { println(it) }

source/fundamentals/auth.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ Edition are as follows:
3232
* :ref:`MONGODB-AWS <mongodb-aws-auth-mechanism>`
3333
* :ref:`X.509 <x509-auth-mechanism>`
3434

35-
.. TODO (DOCSP-29270) Add back when Enterprise Auth is available
36-
.. To authenticate using ``Kerberos`` or ``LDAP``, see the
37-
.. :doc:`Enterprise Authentication Mechanisms guide </fundamentals/enterprise-auth>`.
35+
To authenticate using ``Kerberos`` or ``LDAP``, see the
36+
:doc:`Enterprise Authentication Mechanisms guide </fundamentals/enterprise-auth>`.
3837

3938
For more information on establishing a connection to your MongoDB cluster,
4039
read our :doc:`Connection Guide </fundamentals/connection>`.

source/fundamentals/connection.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ sections:
3131
- :ref:`Enable Network Compression <network-compression>`
3232
- :ref:`Enable TLS/SSL on a Connection <tls-ssl>`
3333

34-
.. TODO:(DOCSP-29261) Add auth docs back in
35-
.. For information about authenticating with a MongoDB instance,
36-
.. see :ref:`<authentication-mechanisms>` and :ref:`<enterprise-authentication-mechanisms>`.
34+
For information about authenticating with a MongoDB instance,
35+
see :ref:`<authentication-mechanisms>` and :ref:`<enterprise-authentication-mechanisms>`.

source/fundamentals/connection/connect.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ To learn more about how connection pools work in the driver, see the :ref:`FAQ p
3232
All resource usage limits, such as max connections, apply to individual
3333
``MongoClient`` instances.
3434

35-
.. TODO:(DOCSP-29267) add content when MongoClient Settings page is added back
36-
.. To learn about the different settings you can use to control the
37-
.. behavior of your ``MongoClient``, see the guide on
38-
.. :ref:`MongoClient Settings <specify-mongoclient-settings>`.
35+
To learn about the different settings you can use to control the
36+
behavior of your ``MongoClient``, see the guide on
37+
:ref:`MongoClient Settings <specify-mongoclient-settings>`.
3938

4039
.. tip::
4140

@@ -60,13 +59,12 @@ This figure uses the :manual:`Standard Connection String Format </reference/conn
6059
``mongodb+srv``, if you want more flexibility of deployment and the ability
6160
to change the servers in rotation without reconfiguring clients.
6261

63-
.. TODO:(DOCSP-29372) add back when kotlin content added to the Atlas docs
64-
.. .. note::
62+
.. note::
6563

66-
.. If your deployment is on MongoDB Atlas, see the
67-
.. :atlas:`Atlas driver connection guide </driver-connection?jmp=docs_driver_kotlin>`
68-
.. and select Kotlin from the language dropdown to retrieve your connection
69-
.. string.
64+
If your deployment is on MongoDB Atlas, see the
65+
:atlas:`Atlas driver connection guide </driver-connection?jmp=docs_driver_kotlin>`
66+
and select :guilabel:`Kotlin` from the language dropdown to retrieve your connection
67+
string.
7068

7169
The next part of the connection URI contains your credentials if you are
7270
using a password-based authentication mechanism. Replace the value of ``user``

source/fundamentals/connection/connection-options.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,10 @@ parameters of the connection URI to specify the behavior of the client.
192192

193193
* - **authMechanism**
194194
- string
195-
- Specifies the authentication mechanism
195+
- Specifies the :doc:`authentication mechanism </fundamentals/auth>`
196196
that the driver should use if a credential
197197
was supplied.
198198

199-
.. TODO:(DOCSP-29261) refactor above to:
200-
.. Specifies the :doc:`authentication mechanism
201-
.. </fundamentals/auth>` that the driver should use if a credential
202-
.. was supplied.
203-
204199
| **Default**: By default, the client picks the most secure
205200
mechanism available based on the server version. For possible
206201
values, see the server documentation for the

0 commit comments

Comments
 (0)