From 926d9071d1ad593ad64aa9671979b09f95689a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Fri, 24 Nov 2023 12:21:56 +0100 Subject: [PATCH 1/2] Simplify in config_dict_generator Avoids MAX_RUNNING being added twice --- tests/unit_tests/config/config_dict_generator.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/unit_tests/config/config_dict_generator.py b/tests/unit_tests/config/config_dict_generator.py index 3acc911bac6..2d214f85d01 100644 --- a/tests/unit_tests/config/config_dict_generator.py +++ b/tests/unit_tests/config/config_dict_generator.py @@ -117,10 +117,6 @@ def memory_with_unit_lsf(draw): } -def valid_queue_options(queue_system: QueueSystem): - return ["MAX_RUNNING"] + VALID_QUEUE_OPTIONS[queue_system] - - def valid_queue_values(option_name, queue_system): if option_name in queue_string_options[queue_system]: return words @@ -142,7 +138,7 @@ def valid_queue_values(option_name, queue_system): @st.composite def queue_options(draw, systems): queue_system = draw(systems) - name = draw(st.sampled_from(valid_queue_options(queue_system))) + name = draw(st.sampled_from(VALID_QUEUE_OPTIONS[queue_system])) do_set = draw(booleans) if do_set: return [queue_system, name, draw(valid_queue_values(name, queue_system))] From f2e7f23fef982d6e21d55b29d2cd2c82ab60ff50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Fri, 24 Nov 2023 12:33:06 +0100 Subject: [PATCH 2/2] Fix bug with submit_sleep and empty string value --- src/ert/config/queue_config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index 6fa15019cce..c32862feb2c 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -112,7 +112,11 @@ def from_dict(cls, config_dict: ConfigDict) -> QueueConfig: " you are effectively replacing the default value provided." ) - if option_name == "SUBMIT_SLEEP" and selected_queue_system == queue_system: + if ( + option_name == "SUBMIT_SLEEP" + and selected_queue_system == queue_system + and values + ): submit_sleep = float(values[0]) for queue_system_val in queue_options: