Skip to content

Commit

Permalink
Bump default wire protocol version: 6 → 7 #233 #235
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaldvogel committed Dec 29, 2024
1 parent fef7d14 commit 646d025
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/src/main/java/de/bwaldvogel/mongo/ServerVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import java.util.List;

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

private final List<Integer> versionArray;
private final int wireVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public abstract class AbstractMongoBackend implements MongoBackend {

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

private MongoVersion version = ServerVersion.MONGO_3_6;
private MongoVersion version = ServerVersion.MONGO_4_0;

private final Clock clock;
private final Instant started;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class ServerVersionTest {
@Test
void testToVersionString() throws Exception {
assertThat(ServerVersion.MONGO_3_6.toVersionString()).isEqualTo("3.6.0");
assertThat(ServerVersion.MONGO_4_0.toVersionString()).isEqualTo("4.0.0");
}

}

0 comments on commit 646d025

Please sign in to comment.