Skip to content

Commit a2f3800

Browse files
committed
CSHARP-3704: Temporarily disable tests failing due to SERVER-57300.
1 parent 2812be1 commit a2f3800

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

tests/MongoDB.Driver.Tests/Linq/Translators/LegacyPredicateTranslatorTests.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using MongoDB.Bson;
2323
using MongoDB.Bson.Serialization;
2424
using MongoDB.Bson.Serialization.Attributes;
25+
using MongoDB.Driver.Core.TestHelpers.XunitExtensions;
2526
using MongoDB.Driver.Linq.Translators;
2627
using Xunit;
2728

@@ -525,9 +526,11 @@ public void TestWhereSASub0ContainsO()
525526
Assert<C>(c => c.SA[0].Contains("o"), 1, "{ \"sa.0\" : /o/s }");
526527
}
527528

528-
[Fact]
529+
[SkippableFact]
529530
public void TestWhereSASub0ContainsONot()
530531
{
532+
RequireServer.Check().VersionLessThan("5.0.0-");
533+
531534
Assert<C>(c => !c.SA[0].Contains("o"), 4, "{ \"sa.0\" : { \"$not\" : /o/s } }");
532535
}
533536

@@ -537,9 +540,11 @@ public void TestWhereSASub0EndsWithM()
537540
Assert<C>(c => c.SA[0].EndsWith("m"), 1, "{ \"sa.0\" : /m$/s }");
538541
}
539542

540-
[Fact]
543+
[SkippableFact]
541544
public void TestWhereSASub0EndsWithMNot()
542545
{
546+
RequireServer.Check().VersionLessThan("5.0.0-");
547+
543548
Assert<C>(c => !c.SA[0].EndsWith("m"), 4, "{ \"sa.0\" : { \"$not\" : /m$/s } }");
544549
}
545550

@@ -550,9 +555,11 @@ public void TestWhereSASub0IsMatch()
550555
Assert<C>(c => regex.IsMatch(c.SA[0]), 1, "{ \"sa.0\" : /^T/ }");
551556
}
552557

553-
[Fact]
558+
[SkippableFact]
554559
public void TestWhereSASub0IsMatchNot()
555560
{
561+
RequireServer.Check().VersionLessThan("5.0.0-");
562+
556563
var regex = new Regex(@"^T");
557564
Assert<C>(c => !regex.IsMatch(c.SA[0]), 4, "{ \"sa.0\" : { \"$not\" : /^T/ } }");
558565
}
@@ -563,9 +570,11 @@ public void TestWhereSASub0IsMatchStatic()
563570
Assert<C>(c => Regex.IsMatch(c.SA[0], "^T"), 1, "{ \"sa.0\" : /^T/ }");
564571
}
565572

566-
[Fact]
573+
[SkippableFact]
567574
public void TestWhereSASub0IsMatchStaticNot()
568575
{
576+
RequireServer.Check().VersionLessThan("5.0.0-");
577+
569578
Assert<C>(c => !Regex.IsMatch(c.SA[0], "^T"), 4, "{ \"sa.0\" : { \"$not\" : /^T/ } }");
570579
}
571580

@@ -581,9 +590,11 @@ public void TestWhereSASub0StartsWithT()
581590
Assert<C>(c => c.SA[0].StartsWith("T"), 1, "{ \"sa.0\" : /^T/s }");
582591
}
583592

584-
[Fact]
593+
[SkippableFact]
585594
public void TestWhereSASub0StartsWithTNot()
586595
{
596+
RequireServer.Check().VersionLessThan("5.0.0-");
597+
587598
Assert<C>(c => !c.SA[0].StartsWith("T"), 4, "{ \"sa.0\" : { \"$not\" : /^T/s } }");
588599
}
589600

0 commit comments

Comments
 (0)