From 572559c6728c5679397f962565ab47b27e402795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Thu, 22 Aug 2024 17:42:42 +0100 Subject: [PATCH] CP-52709: Enable timeslice setting during unit tests by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Edwin Török --- ocaml/tests/common/dune | 1 + ocaml/tests/common/suite_init.ml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml/tests/common/dune b/ocaml/tests/common/dune index 29acca3d2c..a8ab57a4a2 100644 --- a/ocaml/tests/common/dune +++ b/ocaml/tests/common/dune @@ -28,6 +28,7 @@ xapi-stdext-date xapi-stdext-threads.scheduler xapi-stdext-unix + xapi_timeslice ) ) diff --git a/ocaml/tests/common/suite_init.ml b/ocaml/tests/common/suite_init.ml index e63deae17b..adb9c501e8 100644 --- a/ocaml/tests/common/suite_init.ml +++ b/ocaml/tests/common/suite_init.ml @@ -11,4 +11,6 @@ let harness_init () = Filename.concat Test_common.working_area "xapi-inventory" ; Xcp_client.use_switch := false ; Pool_role.set_pool_role_for_test () ; - Message_forwarding.register_callback_fns () + Message_forwarding.register_callback_fns () ; + (* for unit tests use a fixed value *) + Xapi_timeslice.Timeslice.set 0.004