This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 4bf335a3617 [fix][test] Fixed nondeterministic ordering in
MongoSourceTest.testWriteBadMessage (#24835)
4bf335a3617 is described below
commit 4bf335a36176c489634829c6cb5ed01f1d76bd7b
Author: Lucas Eby <[email protected]>
AuthorDate: Tue Nov 11 11:27:48 2025 -0600
[fix][test] Fixed nondeterministic ordering in
MongoSourceTest.testWriteBadMessage (#24835)
---
.../java/org/apache/pulsar/io/mongodb/MongoSourceTest.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git
a/pulsar-io/mongo/src/test/java/org/apache/pulsar/io/mongodb/MongoSourceTest.java
b/pulsar-io/mongo/src/test/java/org/apache/pulsar/io/mongodb/MongoSourceTest.java
index 7243b365e88..79b6fb48973 100644
---
a/pulsar-io/mongo/src/test/java/org/apache/pulsar/io/mongodb/MongoSourceTest.java
+++
b/pulsar-io/mongo/src/test/java/org/apache/pulsar/io/mongodb/MongoSourceTest.java
@@ -128,9 +128,13 @@ public class MongoSourceTest {
Record<byte[]> record = source.read();
- assertEquals(new String(record.getValue()),
- "{\"fullDocument\":{\"hello\":\"pulsar\"},"
+ String value = new String(record.getValue());
+ String expected = "{\"fullDocument\":{\"hello\":\"pulsar\"},"
+
"\"ns\":{\"databaseName\":\"hello\",\"collectionName\":\"pulsar\",\"fullName\":\"hello.pulsar\"},"
- + "\"operation\":\"INSERT\"}");
+ + "\"operation\":\"INSERT\"}";
+ assertEquals(
+ Document.parse(value),
+ Document.parse(expected)
+ );
}
}