@@ -465,7 +465,6 @@ def _assert_final_job_status(job, job_status, expected_status):
465465
466466
467467@pytest .mark .asyncio
468- @pytest .mark .skip (reason = "Flaky in CI" )
469468async def test_job (k8s_cluster , kopf_runner , gen_job ):
470469 with kopf_runner as runner :
471470 async with gen_job ("simplejob.yaml" ) as (job , ns ):
@@ -493,11 +492,11 @@ async def test_job(k8s_cluster, kopf_runner, gen_job):
493492 _assert_job_status_cluster_created (job , job_status )
494493
495494 # Assert job pod is created
496- while job not in k8s_cluster .kubectl ("get" , "po" ):
495+ while job not in k8s_cluster .kubectl ("get" , "po" , "-n" , ns ):
497496 await asyncio .sleep (0.1 )
498497
499498 # Assert that pod started Running
500- while "Running" not in k8s_cluster .kubectl ("get" , "po" ):
499+ while "Running" not in k8s_cluster .kubectl ("get" , "po" , "-n" , ns ):
501500 await asyncio .sleep (0.1 )
502501
503502 await asyncio .sleep (5 ) # Wait for a short time, to avoid race condition
@@ -515,7 +514,7 @@ async def test_job(k8s_cluster, kopf_runner, gen_job):
515514 "jsonpath='{.items[0].metadata.annotations}'" ,
516515 )[1 :- 1 ]
517516 )
518- _EXPECTED_ANNOTATIONS .items () <= job_annotations .items ()
517+ assert _EXPECTED_ANNOTATIONS .items () <= job_annotations .items ()
519518
520519 # Assert job pod runs to completion (will fail if doesn't connect to cluster)
521520 while "Completed" not in k8s_cluster .kubectl (
0 commit comments