Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DerThorsten committed Apr 25, 2024
1 parent b63bb0a commit b498f8e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions quetz/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,16 +598,26 @@ def test_start_server_local_without_deployment(
assert res.exit_code == 1
assert "The specified directory is not a deployment" in res.output

# these tests are strange. I assume they use the fact that pytest timeout might send a signal
# this signal is then processed by the Interrupt class, which kills the server ? I don't know
# but life is too short to figure this out, given that the tests are not testing much
# these tests are strange and time out in the CI
# I thing the logic of the test might have been:
# * the test times out
# * this may fires SIGALRM since @pytest.mark.timeout(1) is used
# * this should trigger the installed signal handler
# * this should terminate the thread
# * we finally test if the process (which runs the server) was exited gracefully with a exitcode of 0
# But long story short, these tests time out in the CI.
# Given their somewhat complicated logic / flow and how little they actually test I would say we just remove them.
if False:

@pytest.mark.parametrize("sqlite_in_memory", [False])
@pytest.mark.timeout(1)
@pytest.mark.xfail(reason="time out")
def test_start_server_local_with_deployment_and_config_file(
empty_config_on_exit: None, config, config_dir, create_channels_dir, create_tables
empty_config_on_exit: None,
config,
config_dir,
create_channels_dir,
create_tables,
):
"""Starting server with deployment directory"""
p = Process(target=cli.app, args=(["start", config_dir, "--port", "8001"],))
Expand Down

0 comments on commit b498f8e

Please sign in to comment.