Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix changed functionality after refactoring testing for test_logging_setup and test_https_requests #9649

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/everest/test_detached.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
@pytest.mark.xdist_group(name="starts_everest")
async def test_https_requests(copy_math_func_test_data_to_tmp):
everest_config = EverestConfig.load_file("config_minimal.yml")
# Overwrite forward_model with model that actually does nothing, since we test for httprequests and server status
everest_config.forward_model = ["toggle_failure"]
everest_config.install_jobs = [
InstallJobConfig(name="toggle_failure", source="jobs/FAIL_SIMULATION")
]
Path("SLEEP_job").write_text("EXECUTABLE sleep", encoding="utf-8")
everest_config.forward_model.append("sleep 5")
everest_config.install_jobs.append(
InstallJobConfig(name="sleep", source="SLEEP_job")
)
# start_server() loads config based on config_path, so we need to actually overwrite it
everest_config.dump("config_minimal.yml")

Expand Down
9 changes: 7 additions & 2 deletions tests/everest/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _string_exists_in_file(file_path, string):


@pytest.mark.flaky(reruns=5)
@pytest.mark.timeout(70) # Simulation might not finish
@pytest.mark.timeout(120) # Simulation might not finish
@pytest.mark.integration_test
@pytest.mark.xdist_group(name="starts_everest")
async def test_logging_setup(copy_math_func_test_data_to_tmp):
Expand All @@ -33,13 +33,18 @@ async def server_running():
everest_config.install_jobs.append(
InstallJobConfig(name="toggle_failure", source="jobs/FAIL_SIMULATION")
)
everest_config.optimization.min_pert_success = 1
everest_config.optimization.max_iterations = 1
everest_config.optimization.min_realizations_success = 1
everest_config.optimization.perturbation_num = 2

# start_server() loads config based on config_path, so we need to actually overwrite it
everest_config.dump("config_minimal.yml")

makedirs_if_needed(everest_config.output_dir, roll_if_exists=True)
driver = await start_server(everest_config, debug=True)
try:
wait_for_server(everest_config.output_dir, 60)
wait_for_server(everest_config.output_dir, 120)
except (SystemExit, RuntimeError) as e:
raise e
await server_running()
Expand Down
Loading