31
31
pytestmark = [pytest .mark .asyncio ]
32
32
33
33
34
- async_bulk_xfail = pytest .mark .xfail (
35
- sys .version_info < (3 , 11 ), reason = "Investigated in issue #62"
36
- )
37
-
38
-
39
34
class AsyncMock (MagicMock ):
40
35
async def __call__ (self , * args , ** kwargs ):
41
36
return super (AsyncMock , self ).__call__ (* args , ** kwargs )
@@ -82,7 +77,6 @@ async def test_actions_remain_unchanged(self, async_client):
82
77
assert ok
83
78
assert [{"_id" : 1 }, {"_id" : 2 }] == actions
84
79
85
- @async_bulk_xfail
86
80
async def test_all_documents_get_inserted (self , async_client ):
87
81
docs = [{"answer" : x , "_id" : x } for x in range (100 )]
88
82
async for ok , item in helpers .async_streaming_bulk (
@@ -95,7 +89,6 @@ async def test_all_documents_get_inserted(self, async_client):
95
89
"_source"
96
90
]
97
91
98
- @async_bulk_xfail
99
92
async def test_documents_data_types (self , async_client ):
100
93
async def async_gen ():
101
94
for x in range (100 ):
@@ -314,7 +307,6 @@ async def test_bulk_works_with_single_item(self, async_client):
314
307
"_source"
315
308
]
316
309
317
- @async_bulk_xfail
318
310
async def test_all_documents_get_inserted (self , async_client ):
319
311
docs = [{"answer" : x , "_id" : x } for x in range (100 )]
320
312
success , failed = await helpers .async_bulk (
@@ -328,7 +320,6 @@ async def test_all_documents_get_inserted(self, async_client):
328
320
"_source"
329
321
]
330
322
331
- @async_bulk_xfail
332
323
async def test_stats_only_reports_numbers (self , async_client ):
333
324
docs = [{"answer" : x } for x in range (100 )]
334
325
success , failed = await helpers .async_bulk (
@@ -464,7 +455,6 @@ async def scan_teardown(async_client):
464
455
465
456
466
457
class TestScan (object ):
467
- @async_bulk_xfail
468
458
async def test_order_can_be_preserved (self , async_client , scan_teardown ):
469
459
bulk = []
470
460
for x in range (100 ):
@@ -486,7 +476,6 @@ async def test_order_can_be_preserved(self, async_client, scan_teardown):
486
476
assert list (map (str , range (100 ))) == list (d ["_id" ] for d in docs )
487
477
assert list (range (100 )) == list (d ["_source" ]["answer" ] for d in docs )
488
478
489
- @async_bulk_xfail
490
479
async def test_all_documents_are_read (self , async_client , scan_teardown ):
491
480
bulk = []
492
481
for x in range (100 ):
@@ -898,7 +887,6 @@ async def reindex_setup(async_client):
898
887
899
888
900
889
class TestReindex (object ):
901
- @async_bulk_xfail
902
890
async def test_reindex_passes_kwargs_to_scan_and_bulk (
903
891
self , async_client , reindex_setup
904
892
):
@@ -920,7 +908,6 @@ async def test_reindex_passes_kwargs_to_scan_and_bulk(
920
908
await async_client .get (index = "prod_index" , id = 42 )
921
909
)["_source" ]
922
910
923
- @async_bulk_xfail
924
911
async def test_reindex_accepts_a_query (self , async_client , reindex_setup ):
925
912
await helpers .async_reindex (
926
913
async_client ,
@@ -940,7 +927,6 @@ async def test_reindex_accepts_a_query(self, async_client, reindex_setup):
940
927
await async_client .get (index = "prod_index" , id = 42 )
941
928
)["_source" ]
942
929
943
- @async_bulk_xfail
944
930
async def test_all_documents_get_moved (self , async_client , reindex_setup ):
945
931
await helpers .async_reindex (
946
932
async_client , "test_index" , "prod_index" , bulk_kwargs = {"refresh" : True }
@@ -991,7 +977,6 @@ async def reindex_data_stream_setup(async_client):
991
977
992
978
class TestAsyncDataStreamReindex (object ):
993
979
@pytest .mark .parametrize ("op_type" , [None , "create" ])
994
- @async_bulk_xfail
995
980
async def test_reindex_index_datastream (
996
981
self , op_type , async_client , reindex_data_stream_setup
997
982
):
@@ -1011,7 +996,6 @@ async def test_reindex_index_datastream(
1011
996
]
1012
997
)
1013
998
1014
- @async_bulk_xfail
1015
999
async def test_reindex_index_datastream_op_type_index (
1016
1000
self , async_client , reindex_data_stream_setup
1017
1001
):
0 commit comments