Skip to content

Commit

Permalink
tests/test_grpc.py: fix error
Browse files Browse the repository at this point in the history
2024-06-27 07:13:45 [    INFO] Received request to list all subsystems, context: <grpc._server._Context object at 0x7f074c1ccac0>, client address: IPv6 [::1]:48924 (grpc.py:2379)
2024-06-27 07:13:45 [    INFO] Received request to create subsystem nqn.2016-06.io.spdk:cnode14, enable_ha: True, max_namespaces: 256, context: None (grpc.py:509)
2024-06-27 07:13:45 [    INFO] No subsystems (cli.py:782)
2024-06-27 07:13:45 [   ERROR] GatewayServer exception occurred: (server.py:111)
Traceback (most recent call last):
  File "/src/tests/test_grpc.py", line 74, in test_create_get_subsys
    assert "No subsystems" not in caplog.text

Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum authored and baum committed Jun 27, 2024
1 parent 0cf123d commit 27e945a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ def test_create_get_subsys(caplog, config):
ceph_utils.execute_ceph_monitor_command("{" + f'"prefix":"nvme-gw create", "id": "{gateway.name}", "pool": "{pool}", "group": ""' + "}")
gateway.serve()

time.sleep(20) # Make sure update() is over

for i in range(subsys_list_count):
cli(["--format", "plain", "subsystem", "list"])
assert "Exception" not in caplog.text
assert "No subsystems" not in caplog.text
time.sleep(0.1)

time.sleep(20) # Make sure update() is over
assert f"{subsystem_prefix}0 with ANA group id 1" in caplog.text
assert f"Received request to set QOS limits for namespace using NSID 1 on {subsystem_prefix}0, R/W IOs per second: 2000 Read megabytes per second: 5" in caplog.text
caplog.clear()
Expand Down

0 comments on commit 27e945a

Please sign in to comment.