@@ -68,6 +68,8 @@ TEST_CASE("check-solution", "[highs_check_solution]") {
6868 // Second pass uses sparse format
6969 write_solution_style = kSolutionStyleSparse ;
7070 }
71+
72+ highs.resetGlobalScheduler (true );
7173}
7274
7375TEST_CASE (" check-set-mip-solution" , " [highs_check_solution]" ) {
@@ -288,6 +290,8 @@ TEST_CASE("check-set-mip-solution", "[highs_check_solution]") {
288290 }
289291 assert (other_tests);
290292 std::remove (solution_file.c_str ());
293+
294+ highs.resetGlobalScheduler (true );
291295}
292296
293297TEST_CASE (" set-pathological-solution" , " [highs_check_solution]" ) {
@@ -314,6 +318,8 @@ TEST_CASE("set-pathological-solution", "[highs_check_solution]") {
314318 highs.setSolution (solution);
315319 highs.run ();
316320 REQUIRE (highs.getModelStatus () == HighsModelStatus::kUnbounded );
321+
322+ highs.resetGlobalScheduler (true );
317323}
318324
319325TEST_CASE (" check-set-lp-solution" , " [highs_check_solution]" ) {
@@ -357,6 +363,8 @@ TEST_CASE("check-set-rowwise-lp-solution", "[highs_check_solution]") {
357363 highs.run ();
358364 double objective2 = highs.getInfo ().objective_function_value ;
359365 REQUIRE (fabs (objective1 - objective2) / max (1.0 , objective1) < 1e-5 );
366+
367+ highs.resetGlobalScheduler (true );
360368}
361369
362370TEST_CASE (" check-set-mip-solution-extra-row" , " [highs_check_solution]" ) {
@@ -387,6 +395,8 @@ TEST_CASE("check-set-mip-solution-extra-row", "[highs_check_solution]") {
387395 highs.run ();
388396 if (dev_run) highs.writeSolution (" " , 1 );
389397 std::remove (solution_file_name.c_str ());
398+
399+ highs.resetGlobalScheduler (true );
390400}
391401
392402TEST_CASE (" check-set-illegal-solution" , " [highs_check_solution]" ) {
@@ -400,6 +410,8 @@ TEST_CASE("check-set-illegal-solution", "[highs_check_solution]") {
400410 REQUIRE (highs.setSolution (solution) == HighsStatus::kError );
401411 solution.col_value .assign (lp.num_col_ , 0 );
402412 REQUIRE (highs.setSolution (solution) == HighsStatus::kOk );
413+
414+ highs.resetGlobalScheduler (true );
403415}
404416
405417TEST_CASE (" read-miplib-solution" , " [highs_check_solution]" ) {
@@ -447,6 +459,8 @@ TEST_CASE("read-miplib-solution", "[highs_check_solution]") {
447459 REQUIRE (h.readSolution (miplib_sol_file) == HighsStatus::kOk );
448460 REQUIRE (h.run () == HighsStatus::kOk );
449461 std::remove (miplib_sol_file.c_str ());
462+
463+ h.resetGlobalScheduler (true );
450464}
451465
452466void runWriteReadCheckSolution (Highs& highs, const std::string& test_name,
@@ -499,6 +513,8 @@ void runWriteReadCheckSolution(Highs& highs, const std::string& test_name,
499513 REQUIRE (status == require_model_status);
500514
501515 std::remove (solution_file.c_str ());
516+
517+ highs.resetGlobalScheduler (true );
502518}
503519
504520void runSetLpSolution (const std::string model) {
@@ -566,4 +582,6 @@ void runSetLpSolution(const std::string model) {
566582 highs.clear ();
567583
568584 std::remove (solution_file.c_str ());
585+
586+ highs.resetGlobalScheduler (true );
569587}
0 commit comments