Skip to content

Commit 364a810

Browse files
authored
Merge branch 'main' into JAVA-5842
2 parents 7be6593 + 332087f commit 364a810

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java

-6
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ public static void applyCustomizations(final TestDef def) {
7676
.test("client-side-operations-timeout", "timeoutMS behaves correctly for GridFS download operations",
7777
"timeoutMS applied to entire download, not individual parts");
7878

79-
def.skipJira("https://jira.mongodb.org/browse/JAVA-5820")
80-
.test("client-side-operations-timeout", "timeoutMS behaves correctly for tailable awaitData cursors",
81-
"apply maxAwaitTimeMS if less than remaining timeout");
82-
8379
def.skipJira("https://jira.mongodb.org/browse/JAVA-5815")
8480
.test("client-side-operations-timeout", "WaitQueueTimeoutError does not clear the pool",
8581
"WaitQueueTimeoutError does not clear the pool");
@@ -298,8 +294,6 @@ public static void applyCustomizations(final TestDef def) {
298294
.file("unified-test-format/tests/valid-pass", "kmsProviders-mixed_kms_credential_fields");
299295
def.skipJira("https://jira.mongodb.org/browse/JAVA-5672")
300296
.file("unified-test-format/tests/valid-pass", "operator-matchAsRoot");
301-
def.skipJira("https://jira.mongodb.org/browse/JAVA-5682")
302-
.file("unified-test-format/tests/valid-pass", "operator-type-number_alias");
303297

304298
// valid fail
305299

driver-sync/src/test/functional/com/mongodb/client/unified/ValueMatcher.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.util.List;
2525
import java.util.stream.Collectors;
2626

27+
import static java.util.Arrays.asList;
2728
import static java.util.Collections.singletonList;
2829
import static org.junit.Assert.assertEquals;
2930
import static org.junit.Assert.assertFalse;
@@ -34,6 +35,7 @@
3435
final class ValueMatcher {
3536
private final Entities entities;
3637
private final AssertionContext context;
38+
private static final List<String> NUMBER_TYPES = asList("int", "long", "double", "decimal");
3739

3840
ValueMatcher(final Entities entities, final AssertionContext context) {
3941
this.entities = entities;
@@ -158,7 +160,8 @@ private void assertValuesMatch(final BsonValue initialExpected, @Nullable final
158160
private void assertExpectedType(final BsonValue actualValue, final BsonValue expectedTypes) {
159161
List<String> types;
160162
if (expectedTypes.isString()) {
161-
types = singletonList(expectedTypes.asString().getValue());
163+
String expectedType = expectedTypes.asString().getValue();
164+
types = expectedType.equals("number") ? NUMBER_TYPES : singletonList(expectedType);
162165
} else if (expectedTypes.isArray()) {
163166
types = expectedTypes.asArray().stream().map(type -> type.asString().getValue()).collect(Collectors.toList());
164167
} else {

0 commit comments

Comments
 (0)