e3.testsuite.running_status

Classes

RunningStatus

Module Contents

class e3.testsuite.running_status.RunningStatus(filename: str, update_interval: float = 1.0)
dag: e3.collection.dag.DAG | None = None
filename
lock
running: Dict[str, e3.testsuite.fragment.TestFragment]

Set of test fragments currently running, indexed by UID.

completed: Dict[str, e3.testsuite.fragment.TestFragment]

Set of test fragments that completed their job, indexed by UID.

status_counters: Dict[e3.testsuite.result.TestStatus, int]

Snapshot of the testsuite’s report index status counters.

We preserve a copy to avoid inconsistent state due to race conditions: these counters are updated in the collect_result method while the other sets are updated in TestFragment.run, which is executed in workers (i.e. other threads).

update_interval = 1.0
no_update_before = 0.0
set_dag(dag: e3.collection.dag.DAG) None

Set the DAG that contains TestFragment instances.

start(fragment: e3.testsuite.fragment.TestFragment) None

Put a fragment in the “running” set.

complete(fragment: e3.testsuite.fragment.TestFragment) None

Move a fragment from the “running” set to the “completed” set.

set_status_counters(counters: Dict[e3.testsuite.result.TestStatus, int]) None
dump() None

Write a report for this status as human-readable text to “fp”.