Skip to content

Commit 1035e50

Browse files
committed
Remove test for the text command because the server has removed support for it.
1 parent cfb8c3a commit 1035e50

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

MongoDB.DriverUnitTests/MongoCollectionTests.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,34 +2941,6 @@ public void TestStrictWrite()
29412941
Assert.Throws<EncoderFallbackException>(() => { collection.Insert(document); });
29422942
}
29432943

2944-
[Test]
2945-
public void TestTextSearch()
2946-
{
2947-
if (_primary.Supports(FeatureId.TextSearchCommand))
2948-
{
2949-
if (_primary.InstanceType != MongoServerInstanceType.ShardRouter)
2950-
{
2951-
using (_server.RequestStart(null, _primary))
2952-
{
2953-
_collection.Drop();
2954-
_collection.Insert(new BsonDocument("x", "The quick brown fox"));
2955-
_collection.Insert(new BsonDocument("x", "jumped over the fence"));
2956-
_collection.CreateIndex(IndexKeys.Text("x"));
2957-
2958-
var textSearchCommand = new CommandDocument
2959-
{
2960-
{ "text", _collection.Name },
2961-
{ "search", "fox" }
2962-
};
2963-
var commandResult = _database.RunCommand(textSearchCommand);
2964-
var response = commandResult.Response;
2965-
Assert.AreEqual(1, response["stats"]["n"].ToInt32());
2966-
Assert.AreEqual("The quick brown fox", response["results"][0]["obj"]["x"].AsString);
2967-
}
2968-
}
2969-
}
2970-
}
2971-
29722944
[Test]
29732945
[RequiresServer(StorageEngines = "mmapv1")]
29742946
public void TestTotalDataSize()

0 commit comments

Comments
 (0)