MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / test_autoalloc_queue_list

Function test_autoalloc_queue_list

tests/autoalloc/test_cli.py:12–43  ·  view source on GitHub ↗
(hq_env: HqEnv, flavor: ManagerFlavor)

Source from the content-addressed store, hash-verified

10
11@all_flavors
12def test_autoalloc_queue_list(hq_env: HqEnv, flavor: ManagerFlavor):
13 hq_env.start_server()
14 add_queue(hq_env, manager=flavor.manager_type(), name=None, backlog=5)
15
16 table = hq_env.command(["alloc", "list"], as_table=True)
17 table.check_columns_value(
18 (
19 "ID",
20 "Backlog size",
21 "Max workers per alloc",
22 "Timelimit",
23 "Manager",
24 "Name",
25 ),
26 0,
27 ("1", "5", "1", "1h", flavor.manager_type().upper(), ""),
28 )
29
30 add_queue(
31 hq_env,
32 manager=flavor.manager_type(),
33 name="bar",
34 backlog=1,
35 max_workers_per_alloc=2,
36 time_limit="1h",
37 )
38 table = hq_env.command(["alloc", "list"], as_table=True)
39 table.check_columns_value(
40 ("ID", "Backlog size", "Max workers per alloc", "Timelimit", "Name", "Manager"),
41 1,
42 ("2", "1", "2", "1h", "bar", flavor.manager_type().upper()),
43 )
44
45
46@all_flavors

Callers

nothing calls this directly

Calls 5

commandMethod · 0.80
check_columns_valueMethod · 0.80
add_queueFunction · 0.70
start_serverMethod · 0.45
manager_typeMethod · 0.45

Tested by

no test coverage detected