From 74cfc8e86c3dfb2273951929fabd17529c2a2e05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Madon?= <mael.madon@irit.fr>
Date: Tue, 11 Apr 2023 14:10:33 +0200
Subject: [PATCH] refac: adapted the CLI calls in the tests to remove the
 option queue_order

---
 src/scheds/bin_packing_energy.cpp | 1 -
 test/test_assertion_error.py      | 2 +-
 test/test_broker.py               | 2 +-
 test/test_schedulers_multi.py     | 4 ++--
 test/test_users.py                | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/scheds/bin_packing_energy.cpp b/src/scheds/bin_packing_energy.cpp
index e98405c..978a333 100644
--- a/src/scheds/bin_packing_energy.cpp
+++ b/src/scheds/bin_packing_energy.cpp
@@ -113,7 +113,6 @@ void BinPackingEnergy::on_simulation_start(
     // PPK_ASSERT_ERROR(
     //     batsim_config["dynamic-jobs-enabled"].GetBool(), "This algorithm only
     //     works if dynamic job are enabled!");
-    // TODO: send an error if the order asked in not DescendingSizeOrder
 
     /* TODO (wait for batsim5.0):
      *   - retrieve the nb of cores per machine from the platform file and
diff --git a/test/test_assertion_error.py b/test/test_assertion_error.py
index 7dcfdeb..46ead0d 100644
--- a/test/test_assertion_error.py
+++ b/test/test_assertion_error.py
@@ -41,7 +41,7 @@ def error_user(user_name, platform_multiC, expected_error="", test_name=None, sc
                             "--energy  --enable-compute-sharing --enable-dynamic-jobs --acknowledge-dynamic-jobs --enable-profile-reuse")
     instance = RobinInstance(output_dir=output_dir,
                              batcmd=batcmd,
-                             schedcmd=f"batmen -v bin_packing --queue_order=desc_size --variant_options_filepath {schedconf}",
+                             schedcmd=f"batmen -v bin_packing --variant_options_filepath {schedconf}",
                              simulation_timeout=30, ready_timeout=5,
                              success_timeout=10, failure_timeout=0
                              )
diff --git a/test/test_broker.py b/test/test_broker.py
index fc72749..2effe5f 100644
--- a/test/test_broker.py
+++ b/test/test_broker.py
@@ -36,7 +36,7 @@ def test_broker_multi(platform_multiC, workload_static, sched_multi):
     batcmd = gen_batsim_cmd(platform_multiC.filename, workload_static.filename, output_dir, "--energy  --enable-compute-sharing --enable-dynamic-jobs --acknowledge-dynamic-jobs --enable-profile-reuse")
     instance = RobinInstance(output_dir=output_dir,
         batcmd=batcmd,
-        schedcmd=f"batmen -v {sched_multi.name} --queue_order=desc_size --variant_options_filepath test/schedconf/user_description_file.json",
+        schedcmd=f"batmen -v {sched_multi.name} --variant_options_filepath test/schedconf/user_description_file.json",
         simulation_timeout=30, ready_timeout=5,
         success_timeout=10, failure_timeout=0
     )
diff --git a/test/test_schedulers_multi.py b/test/test_schedulers_multi.py
index ce0f4b0..73b6e7f 100644
--- a/test/test_schedulers_multi.py
+++ b/test/test_schedulers_multi.py
@@ -34,7 +34,7 @@ def test_bin_packing(platform_multiC, workload_static):
     batcmd = gen_batsim_cmd(platform_multiC.filename, workload_static.filename, output_dir, "--energy --enable-compute-sharing")
     instance = RobinInstance(output_dir=output_dir,
         batcmd=batcmd,
-        schedcmd=f"batmen -v {sched} --queue_order=desc_size",
+        schedcmd=f"batmen -v {sched}",
         simulation_timeout=30, ready_timeout=5,
         success_timeout=10, failure_timeout=0
     )
@@ -57,7 +57,7 @@ def test_bin_packing_energy(platform_multiC, workload_static):
     batcmd = gen_batsim_cmd(platform_multiC.filename, workload_static.filename, output_dir, "--energy --enable-compute-sharing")
     instance = RobinInstance(output_dir=output_dir,
         batcmd=batcmd,
-        schedcmd=f"batmen -v {sched} --queue_order=desc_size",
+        schedcmd=f"batmen -v {sched}",
         simulation_timeout=30, ready_timeout=5,
         success_timeout=10, failure_timeout=0
     )
diff --git a/test/test_users.py b/test/test_users.py
index 65a5542..5be9550 100644
--- a/test/test_users.py
+++ b/test/test_users.py
@@ -50,7 +50,7 @@ def run_user(user_name, platform_multiC, test_name=None, schedconf=None):
                             "--energy  --enable-compute-sharing --enable-dynamic-jobs --acknowledge-dynamic-jobs --enable-profile-reuse")
     instance = RobinInstance(output_dir=output_dir,
                              batcmd=batcmd,
-                             schedcmd=f"batmen -v bin_packing --queue_order=desc_size --variant_options_filepath {schedconf}",
+                             schedcmd=f"batmen -v bin_packing --variant_options_filepath {schedconf}",
                              simulation_timeout=30, ready_timeout=5,
                              success_timeout=10, failure_timeout=0
                              )
-- 
GitLab