Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1b72761
Add a mongot search sidecar to the replica-set target
danielfrankcom Jun 17, 2026
c9d0da7
Add search stage tests
danielfrankcom Jun 23, 2026
8f9b4d4
merge from upstream/main
danielfrankcom Jun 25, 2026
44a668c
Use the thread timeout method so wedged tests are killed
danielfrankcom Jun 25, 2026
60428ff
Capture per-service container logs from the test jobs
danielfrankcom Jun 25, 2026
b93de5d
Cap the mongot JVM heap to keep the replset CI runner in memory
danielfrankcom Jun 25, 2026
1efa866
Add required-field validation for in/near/equals/range operators
danielfrankcom Jun 26, 2026
c6096dc
Add count null-default and non-finite threshold tests
danielfrankcom Jun 26, 2026
1f6a718
Add doesNotAffect operator option tests for equals/in/range
danielfrankcom Jun 26, 2026
447ff1c
Add searchNodePreference and returnScope stage option tests
danielfrankcom Jun 26, 2026
2c17775
Add operator score modifier variant and validity tests
danielfrankcom Jun 26, 2026
892f448
Add per-operator score compatibility tests
danielfrankcom Jun 26, 2026
52758a6
Pin the mongot image to 1.70.1 and migrate its config to the new sync…
danielfrankcom Jul 1, 2026
a1f8417
Add queryString, moreLikeThis, and embeddedDocument operator tests
danielfrankcom Jul 1, 2026
f8d1624
Add text multi-analyzer path tests
danielfrankcom Jul 1, 2026
87555f9
Add returnScope tests
danielfrankcom Jul 1, 2026
2c74432
Add operator-vocabulary and prerequisite rejection tests
danielfrankcom Jul 1, 2026
936ba71
merge from upstream/main
danielfrankcom Jul 2, 2026
426b872
Fix flaky wtimeout cases
danielfrankcom Jul 7, 2026
eef321d
Merge branch 'main' into pr/search
eerxuan Jul 9, 2026
fd5d4b6
merge from upstream/main
danielfrankcom Jul 9, 2026
2fe41a4
Build large $search text query payloads lazily
danielfrankcom Jul 9, 2026
a87d700
Merge branch 'main' into pr/search
eerxuan Jul 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
)
from documentdb_tests.framework.executor import execute_command
from documentdb_tests.framework.parametrize import pytest_params
from documentdb_tests.framework.property_checks import Eq
from documentdb_tests.framework.test_constants import (
DECIMAL128_ZERO,
FLOAT_INFINITY,
Expand Down Expand Up @@ -101,7 +102,7 @@
"size": 100_000,
"writeConcern": {"wtimeout": 0},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=0 should succeed",
),
CommandTestCase(
Expand All @@ -113,7 +114,7 @@
"size": 100_000,
"writeConcern": {"wtimeout": 1000},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=1000 should succeed",
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
)
from documentdb_tests.framework.executor import execute_command
from documentdb_tests.framework.parametrize import pytest_params
from documentdb_tests.framework.property_checks import Eq
from documentdb_tests.framework.test_constants import (
DECIMAL128_ZERO,
FLOAT_INFINITY,
Expand Down Expand Up @@ -99,11 +100,8 @@
"size": 100_000,
"writeConcern": {"wtimeout": v},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg=f"wtimeout={id} should succeed",
# A negative wtimeout is accepted cleanly on a standalone server but a
# replica set reports a writeConcernError, so gate that case.
marks=((pytest.mark.requires(quorum_write_concern=False),) if id == "negative" else ()),
)
for id, val in [
("zero", 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from documentdb_tests.framework.error_codes import FAILED_TO_PARSE_ERROR
from documentdb_tests.framework.executor import execute_command
from documentdb_tests.framework.parametrize import pytest_params
from documentdb_tests.framework.property_checks import Eq
from documentdb_tests.framework.test_constants import (
DECIMAL128_INFINITY,
DECIMAL128_NAN,
Expand All @@ -32,49 +33,49 @@
WRITE_CONCERN_WTIMEOUT_ACCEPTED_TESTS: list[CommandTestCase] = [
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": True}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:bool true should be accepted",
id="wtimeout_bool_true",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": False}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:bool false should be accepted",
id="wtimeout_bool_false",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": 2.5}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:double should be accepted",
id="wtimeout_double",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": Int64(42)}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:Int64 should be accepted",
id="wtimeout_int64",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": Decimal128("99")}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:Decimal128 should be accepted",
id="wtimeout_decimal128",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": 5}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:int32 should be accepted",
id="wtimeout_int32",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": "hello"}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:string should be accepted",
id="wtimeout_string",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": None}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:null should be treated as omitted and succeed",
id="wtimeout_null",
),
Expand All @@ -86,7 +87,7 @@
WRITE_CONCERN_WTIMEOUT_SPECIAL_VALUES_TESTS: list[CommandTestCase] = [
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": INT32_MAX}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:max int32 should be accepted",
id="wtimeout_max_int32",
),
Expand All @@ -95,58 +96,55 @@
"dropDatabase": 1,
"writeConcern": {"wtimeout": INT64_MIN},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:Int64 min should be accepted",
marks=(pytest.mark.requires(quorum_write_concern=False),),
id="wtimeout_int64_min",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": FLOAT_NAN}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:NaN should be accepted",
id="wtimeout_float_nan",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": FLOAT_NEGATIVE_NAN}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:negative NaN should be accepted",
id="wtimeout_float_neg_nan",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": FLOAT_NEGATIVE_INFINITY}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:-Infinity should be accepted",
marks=(pytest.mark.requires(quorum_write_concern=False),),
id="wtimeout_float_neg_infinity",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": DECIMAL128_NAN}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:Decimal128('NaN') should be accepted",
id="wtimeout_decimal128_nan",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": DECIMAL128_NEGATIVE_NAN}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:Decimal128 negative NaN should be accepted",
id="wtimeout_decimal128_neg_nan",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": DECIMAL128_NEGATIVE_INFINITY}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:Decimal128('-Infinity') should be accepted",
marks=(pytest.mark.requires(quorum_write_concern=False),),
id="wtimeout_decimal128_neg_infinity",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": DOUBLE_NEGATIVE_ZERO}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:float -0.0 should be accepted",
id="wtimeout_float_neg_zero",
),
CommandTestCase(
command={"dropDatabase": 1, "writeConcern": {"wtimeout": DECIMAL128_NEGATIVE_ZERO}},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout:Decimal128 -0 should be accepted",
id="wtimeout_decimal128_neg_zero",
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
)
from documentdb_tests.framework.executor import execute_admin_command
from documentdb_tests.framework.parametrize import pytest_params
from documentdb_tests.framework.property_checks import Eq
from documentdb_tests.framework.test_constants import (
DECIMAL128_INFINITY,
DECIMAL128_NAN,
Expand Down Expand Up @@ -93,7 +94,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": 0},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=0 should be accepted",
),
CommandTestCase(
Expand All @@ -104,7 +105,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": 1000},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=1000 should be accepted",
),
CommandTestCase(
Expand All @@ -115,7 +116,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": INT32_OVERFLOW - 1},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=INT32_MAX should be accepted",
),
CommandTestCase(
Expand All @@ -126,9 +127,8 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": -1},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=-1 (negative) should be accepted",
marks=(pytest.mark.requires(quorum_write_concern=False),),
),
CommandTestCase(
"wc_wtimeout_neg_infinity",
Expand All @@ -138,9 +138,8 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": FLOAT_NEGATIVE_INFINITY},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=-Infinity should be accepted",
marks=(pytest.mark.requires(quorum_write_concern=False),),
),
CommandTestCase(
"wc_wtimeout_nan",
Expand All @@ -150,7 +149,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": FLOAT_NAN},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=NaN should be accepted",
),
CommandTestCase(
Expand All @@ -161,7 +160,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": "1000"},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout as string should be accepted",
),
CommandTestCase(
Expand All @@ -172,7 +171,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": True},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout as bool should be accepted",
),
CommandTestCase(
Expand All @@ -183,7 +182,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": None},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=null should be accepted",
),
CommandTestCase(
Expand All @@ -194,7 +193,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": [1000]},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout as array should be accepted",
),
CommandTestCase(
Expand All @@ -205,7 +204,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": {"ms": 1000}},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout as object should be accepted",
),
CommandTestCase(
Expand All @@ -216,7 +215,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": Int64(1000)},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout as Int64 should be accepted",
),
CommandTestCase(
Expand All @@ -227,7 +226,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": Decimal128("1000")},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout as Decimal128 should be accepted",
),
CommandTestCase(
Expand All @@ -238,7 +237,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": FLOAT_NEGATIVE_NAN},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=negative NaN should be accepted",
),
CommandTestCase(
Expand All @@ -249,7 +248,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": DECIMAL128_NAN},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=Decimal128('NaN') should be accepted",
),
CommandTestCase(
Expand All @@ -260,7 +259,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": DECIMAL128_NEGATIVE_NAN},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=Decimal128 negative NaN should be accepted",
),
CommandTestCase(
Expand All @@ -271,9 +270,8 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": DECIMAL128_NEGATIVE_INFINITY},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=Decimal128('-Infinity') should be accepted",
marks=(pytest.mark.requires(quorum_write_concern=False),),
),
CommandTestCase(
"wc_wtimeout_neg_zero",
Expand All @@ -283,7 +281,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": DOUBLE_NEGATIVE_ZERO},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=-0.0 should be accepted",
),
CommandTestCase(
Expand All @@ -294,7 +292,7 @@
"to": f"{ctx.database}.{ctx.collection}_dest",
"writeConcern": {"wtimeout": DECIMAL128_NEGATIVE_ZERO},
},
expected={"ok": 1.0},
expected={"ok": Eq(1.0)},
msg="wtimeout=Decimal128('-0') should be accepted",
),
]
Expand Down
Loading
Loading