diff --git a/src/MongoDB.Driver/Core/Misc/WireVersion.cs b/src/MongoDB.Driver/Core/Misc/WireVersion.cs
index fe5f9f36a83..29ccc23179a 100644
--- a/src/MongoDB.Driver/Core/Misc/WireVersion.cs
+++ b/src/MongoDB.Driver/Core/Misc/WireVersion.cs
@@ -128,6 +128,10 @@ internal static class WireVersion
/// Wire version 27.
///
public const int Server82 = 27;
+ ///
+ /// Wire version 28.
+ ///
+ public const int Server83 = 28;
// note: keep WireVersion.cs and ServerVersion.cs in sync
@@ -167,9 +171,10 @@ internal static class WireVersion
new WireVersionInfo(wireVersion: 25, major: 8, minor: 0),
new WireVersionInfo(wireVersion: 26, major: 8, minor: 1),
new WireVersionInfo(wireVersion: 27, major: 8, minor: 2),
+ new WireVersionInfo(wireVersion: 28, major: 8, minor: 3)
};
- private static Range __supportedWireVersionRange = CreateSupportedWireVersionRange(minWireVersion: Server42, maxWireVersion: Server82);
+ private static Range __supportedWireVersionRange = CreateSupportedWireVersionRange(minWireVersion: Server42, maxWireVersion: Server83);
private static Range CreateSupportedWireVersionRange(int minWireVersion, int maxWireVersion)
{
diff --git a/src/MongoDB.Driver/ServerVersion.cs b/src/MongoDB.Driver/ServerVersion.cs
index b938a350d00..b7b56e419a5 100644
--- a/src/MongoDB.Driver/ServerVersion.cs
+++ b/src/MongoDB.Driver/ServerVersion.cs
@@ -152,7 +152,12 @@ public enum ServerVersion
///
/// Server version 8.2.
///
- Server82
+ Server82,
+
+ ///
+ /// Server version 8.3.
+ ///
+ Server83
// note: keep Server.cs and WireVersion.cs in sync as well as the extension methods below
}
@@ -189,7 +194,8 @@ public static ServerVersion ToServerVersion(this int wireVersion)
WireVersion.Server80 => ServerVersion.Server80,
WireVersion.Server81 => ServerVersion.Server81,
WireVersion.Server82 => ServerVersion.Server82,
- _ => throw new ArgumentException($"Invalid write version: {wireVersion}.", nameof(wireVersion))
+ WireVersion.Server83 => ServerVersion.Server83,
+ _ => throw new ArgumentException($"Invalid wire version: {wireVersion}.", nameof(wireVersion))
};
}
@@ -224,6 +230,7 @@ public static int ToWireVersion(this ServerVersion? serverVersion)
ServerVersion.Server80 => WireVersion.Server80,
ServerVersion.Server81 => WireVersion.Server81,
ServerVersion.Server82 => WireVersion.Server82,
+ ServerVersion.Server83 => WireVersion.Server83,
_ => throw new ArgumentException($"Invalid server version: {serverVersion}.", nameof(serverVersion))
};
}
diff --git a/tests/MongoDB.Driver.Tests/Core/Clusters/ClusterTests.cs b/tests/MongoDB.Driver.Tests/Core/Clusters/ClusterTests.cs
index c2b9bdcf01a..2b9f141dec0 100644
--- a/tests/MongoDB.Driver.Tests/Core/Clusters/ClusterTests.cs
+++ b/tests/MongoDB.Driver.Tests/Core/Clusters/ClusterTests.cs
@@ -64,7 +64,7 @@ public void SupportedWireVersionRange_should_return_expected_result()
{
var result = Cluster.SupportedWireVersionRange;
- result.Should().Be(new Range(8, 27));
+ result.Should().Be(new Range(8, 28));
}
[Fact]
@@ -283,8 +283,8 @@ await Record.ExceptionAsync(() => subject.SelectServerAsync(OperationContext.NoT
[Theory]
[InlineData(0, 0, false)]
[InlineData(0, 0, true)]
- [InlineData(28, 29, false)]
- [InlineData(28, 29, true)]
+ [InlineData(29, 30, false)]
+ [InlineData(29, 30, true)]
public async Task SelectServer_should_throw_if_any_servers_are_incompatible(int min, int max, bool async)
{
var subject = CreateSubject();
diff --git a/tests/MongoDB.Driver.Tests/Core/Misc/WireVersionTests.cs b/tests/MongoDB.Driver.Tests/Core/Misc/WireVersionTests.cs
index 0e4566d9a09..9dc3d5538ae 100644
--- a/tests/MongoDB.Driver.Tests/Core/Misc/WireVersionTests.cs
+++ b/tests/MongoDB.Driver.Tests/Core/Misc/WireVersionTests.cs
@@ -47,7 +47,7 @@ public void GetServerVersionForErrorMessage_should_return_expected_serverVersion
[Fact]
public void SupportedWireRange_should_be_correct()
{
- WireVersion.SupportedWireVersionRange.Should().Be(new Range(8, 27));
+ WireVersion.SupportedWireVersionRange.Should().Be(new Range(8, 28));
}
[Fact]
@@ -60,7 +60,8 @@ public void ToServerVersion_should_throw_if_wireVersion_less_than_0()
[Theory]
[InlineData(99, null, null)]
- [InlineData(28, null, null)]
+ [InlineData(29, null, null)]
+ [InlineData(28, 8, 3)]
[InlineData(27, 8, 2)]
[InlineData(26, 8, 1)]
[InlineData(25, 8, 0)]
diff --git a/tests/MongoDB.Driver.Tests/Core/Servers/ServerDescriptionTests.cs b/tests/MongoDB.Driver.Tests/Core/Servers/ServerDescriptionTests.cs
index 2ebceb191d0..16e928d8d11 100644
--- a/tests/MongoDB.Driver.Tests/Core/Servers/ServerDescriptionTests.cs
+++ b/tests/MongoDB.Driver.Tests/Core/Servers/ServerDescriptionTests.cs
@@ -266,10 +266,10 @@ public void Equals_should_return_true_when_all_fields_are_equal()
[InlineData(new[] { 7, 8 }, true)]
[InlineData(new[] { 8, 8 }, true)]
[InlineData(new[] { 8, 21 }, true)]
- [InlineData(new[] { 27, 27 }, true)]
- [InlineData(new[] { 27, 28 }, true)]
- [InlineData(new[] { 28, 28 }, false)]
- [InlineData(new[] { 28, 29 }, false)]
+ [InlineData(new[] { 28, 28 }, true)]
+ [InlineData(new[] { 28, 29 }, true)]
+ [InlineData(new[] { 29, 29 }, false)]
+ [InlineData(new[] { 29, 30 }, false)]
public void IsCompatibleWithDriver_should_return_expected_result(int[] minMaxWireVersions, bool expectedResult)
{
var clusterId = new ClusterId(1);