44
55import pymongo
66import pytest
7- from mlink import Runner
7+ from plm import Runner
88from testing import Testing
99
1010
@@ -61,12 +61,12 @@ def test_create_partial(t: Testing, phase: Runner.Phase):
6161
6262@pytest .mark .parametrize ("phase" , [Runner .Phase .APPLY , Runner .Phase .CLONE ])
6363def test_create_hidden (t : Testing , phase : Runner .Phase ):
64- with t .run (phase ) as mlink :
64+ with t .run (phase ) as plm :
6565 name = t .source ["db_1" ]["coll_1" ].create_index ({"i" : 1 }, hidden = True )
6666 assert t .source ["db_1" ]["coll_1" ].index_information ()[name ]["hidden" ]
6767
6868 if phase == Runner .Phase .APPLY :
69- mlink .wait_for_current_optime ()
69+ plm .wait_for_current_optime ()
7070 assert "hidden" not in t .target ["db_1" ]["coll_1" ].index_information ()[name ]
7171
7272 t .compare_all ()
@@ -296,7 +296,7 @@ def test_modify_unique(t: Testing, phase: Runner.Phase):
296296
297297@pytest .mark .parametrize ("phase" , [Runner .Phase .APPLY , Runner .Phase .CLONE ])
298298def test_internal_create_many_props (t : Testing , phase : Runner .Phase ):
299- with t .run (phase ) as mlink :
299+ with t .run (phase ) as plm :
300300 options = {
301301 "unique" : True ,
302302 "hidden" : True ,
@@ -309,7 +309,7 @@ def test_internal_create_many_props(t: Testing, phase: Runner.Phase):
309309 assert source_index .get (prop ) == val
310310
311311 if phase == Runner .Phase .APPLY :
312- mlink .wait_for_current_optime ()
312+ plm .wait_for_current_optime ()
313313 target_index = t .target ["db_1" ]["coll_1" ].index_information ()[index_name ]
314314 for prop , val in options .items ():
315315 if prop == "expireAfterSeconds" :
@@ -324,7 +324,7 @@ def test_internal_create_many_props(t: Testing, phase: Runner.Phase):
324324def test_internal_modify_many_props (t : Testing , phase : Runner .Phase ):
325325 index_name = t .source ["db_1" ]["coll_1" ].create_index ({"i" : 1 })
326326
327- with t .run (phase ) as mlink :
327+ with t .run (phase ) as plm :
328328 t .source ["db_1" ].command (
329329 {
330330 "collMod" : "coll_1" ,
@@ -336,7 +336,7 @@ def test_internal_modify_many_props(t: Testing, phase: Runner.Phase):
336336 assert source_index ["prepareUnique" ]
337337
338338 if phase == Runner .Phase .APPLY :
339- mlink .wait_for_current_optime ()
339+ plm .wait_for_current_optime ()
340340 target_index = t .target ["db_1" ]["coll_1" ].index_information ()[index_name ]
341341 assert "prepareUnique" not in target_index
342342
@@ -357,7 +357,7 @@ def test_internal_modify_many_props(t: Testing, phase: Runner.Phase):
357357 assert source_index .get (prop ) == val
358358
359359 if phase == Runner .Phase .APPLY :
360- mlink .wait_for_current_optime ()
360+ plm .wait_for_current_optime ()
361361 target_index = t .target ["db_1" ]["coll_1" ].index_information ()[index_name ]
362362 for prop , val in modify_options .items ():
363363 if prop == "expireAfterSeconds" :
@@ -379,9 +379,9 @@ def test_internal_modify_index_props_complex(t: Testing, phase: Runner.Phase):
379379 assert "hidden" not in source_index1
380380 assert "expireAfterSeconds" not in source_index1
381381
382- with t .run (phase ) as mlink :
382+ with t .run (phase ) as plm :
383383 if phase == Runner .Phase .APPLY :
384- mlink .wait_for_current_optime ()
384+ plm .wait_for_current_optime ()
385385 target_index = t .target ["db_1" ]["coll_1" ].index_information ()[index_name ]
386386 assert "prepareUnique" not in target_index
387387 assert "unique" not in target_index
@@ -408,7 +408,7 @@ def test_internal_modify_index_props_complex(t: Testing, phase: Runner.Phase):
408408 assert source_index2 ["expireAfterSeconds" ] == 132
409409
410410 if phase == Runner .Phase .APPLY :
411- mlink .wait_for_current_optime ()
411+ plm .wait_for_current_optime ()
412412 target_index = t .target ["db_1" ]["coll_1" ].index_information ()[index_name ]
413413 assert "prepareUnique" not in target_index
414414 assert "unique" not in target_index
@@ -433,7 +433,7 @@ def test_internal_modify_index_props_complex(t: Testing, phase: Runner.Phase):
433433 assert source_index3 ["expireAfterSeconds" ] == 133
434434
435435 if phase == Runner .Phase .APPLY :
436- mlink .wait_for_current_optime ()
436+ plm .wait_for_current_optime ()
437437 target_index = t .target ["db_1" ]["coll_1" ].index_information ()[index_name ]
438438 assert "prepareUnique" not in target_index
439439 assert "unique" not in target_index
@@ -449,16 +449,16 @@ def test_internal_modify_index_props_complex(t: Testing, phase: Runner.Phase):
449449
450450
451451def test_manual_create_ttl (t : Testing ):
452- mlink = t .run (Runner .Phase .MANUAL )
452+ plm = t .run (Runner .Phase .MANUAL )
453453 try :
454454 t .source ["db_1" ]["coll_1" ].create_index ({"a" : 1 }, expireAfterSeconds = 1 )
455- mlink .start ()
455+ plm .start ()
456456 t .source ["db_1" ]["coll_1" ].create_index ({"b" : 1 }, expireAfterSeconds = 1 )
457- mlink .wait_for_initial_sync ()
457+ plm .wait_for_initial_sync ()
458458 t .source ["db_1" ]["coll_1" ].create_index ({"c" : 1 }, expireAfterSeconds = 1 )
459- mlink .finalize ()
459+ plm .finalize ()
460460 except :
461- mlink .finalize (fast = True )
461+ plm .finalize (fast = True )
462462 raise
463463
464464 t .compare_all ()
0 commit comments