Skip to content

Commit 21aff04

Browse files
committed
CSHARP-2213: Disable MaxScan integration test on server 4.1.0 and up.
1 parent 7fe5e80 commit 21aff04

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/MongoDB.Driver.Core/Core/Misc/SemanticVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public static bool TryParse(string value, out SemanticVersion result)
203203
{
204204
if (!string.IsNullOrEmpty(value))
205205
{
206-
var pattern = @"(?<major>\d+)\.(?<minor>\d+)(\.(?<patch>\d+)(-(?<preRelease>.+))?)?";
206+
var pattern = @"(?<major>\d+)\.(?<minor>\d+)(\.(?<patch>\d+)(-(?<preRelease>.*))?)?";
207207
var match = Regex.Match((string)value, pattern);
208208
if (match.Success)
209209
{

src/MongoDB.Driver.Core/MongoException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
using System;
1717
using System.Collections.Generic;
18+
using MongoDB.Driver.Core.Misc;
1819
#if NET45
1920
using System.Runtime.Serialization;
20-
using MongoDB.Driver.Core.Misc;
2121
#endif
2222

2323
namespace MongoDB.Driver

tests/MongoDB.Driver.Legacy.Tests/MongoCollectionTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,9 +1563,10 @@ public void TestFindWithinRectangle()
15631563
// note: the hits are unordered
15641564
}
15651565

1566-
[Fact]
1566+
[SkippableFact]
15671567
public void TestFindWithMaxScan()
15681568
{
1569+
RequireServer.Check().VersionLessThan("4.1.0-");
15691570
_collection.Drop();
15701571
var docs = Enumerable.Range(0, 10).Select(x => new BsonDocument("_id", x));
15711572
_collection.InsertBatch(docs);

0 commit comments

Comments
 (0)