Skip to content

Commit 646d025

Browse files
committed
Bump default wire protocol version: 6 → 7 #233 #235
1 parent fef7d14 commit 646d025

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

core/src/main/java/de/bwaldvogel/mongo/ServerVersion.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import java.util.List;
55

66
public enum ServerVersion implements MongoVersion {
7-
MONGO_3_6(List.of(3, 6, 0), 6);
7+
MONGO_3_6(List.of(3, 6, 0), 6),
8+
MONGO_4_0(List.of(4, 0, 0), 7);
89

910
private final List<Integer> versionArray;
1011
private final int wireVersion;

core/src/main/java/de/bwaldvogel/mongo/backend/AbstractMongoBackend.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public abstract class AbstractMongoBackend implements MongoBackend {
5050

5151
private final Map<String, MongoDatabase> databases = new ConcurrentHashMap<>();
5252

53-
private MongoVersion version = ServerVersion.MONGO_3_6;
53+
private MongoVersion version = ServerVersion.MONGO_4_0;
5454

5555
private final Clock clock;
5656
private final Instant started;

core/src/test/java/de/bwaldvogel/mongo/ServerVersionTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class ServerVersionTest {
99
@Test
1010
void testToVersionString() throws Exception {
1111
assertThat(ServerVersion.MONGO_3_6.toVersionString()).isEqualTo("3.6.0");
12+
assertThat(ServerVersion.MONGO_4_0.toVersionString()).isEqualTo("4.0.0");
1213
}
1314

1415
}

0 commit comments

Comments
 (0)