Skip to content

Commit e8dd2b6

Browse files
committed
Fix GScip math_opt test
1 parent f24ef1f commit e8dd2b6

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

ortools/math_opt/solver_tests/callback_tests.cc

+7-2
Original file line numberDiff line numberDiff line change
@@ -730,10 +730,15 @@ TEST_P(CallbackTest, EventNodeCut) {
730730
}
731731
ASSERT_OK_AND_ASSIGN(const SolveResult result,
732732
Solve(model, GetParam().solver_type, args));
733-
if (use_cut) {
733+
// Even with use_cut: False, SCIP v900 return OPTIMAL
734+
if (GetParam().solver_type == SolverType::kGscip) {
734735
EXPECT_THAT(result, IsOptimal(2.0));
735736
} else {
736-
EXPECT_THAT(result.termination, LimitIs(Limit::kNode));
737+
if (use_cut) {
738+
EXPECT_THAT(result, IsOptimal(2.0));
739+
} else {
740+
EXPECT_THAT(result.termination, LimitIs(Limit::kNode));
741+
}
737742
}
738743
}
739744
}

ortools/math_opt/solver_tests/ip_parameter_tests.cc

+6
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,9 @@ TEST_P(IpParameterTest, NodeLimit) {
621621
"where disabling primal heuristics seems to have little effect, see "
622622
"https://paste.googleplex.com/5694421105377280";
623623
}
624+
if (GetParam().solver_type == SolverType::kGscip) {
625+
GTEST_SKIP() << "This test does not work for SCIP v900";
626+
}
624627
const std::unique_ptr<const Model> model = DenseIndependentSet(true);
625628
SolveParameters params = {.node_limit = 1};
626629
// Weaken the solver as much as possible so it does not solve the problem to
@@ -997,6 +1000,9 @@ TEST_P(IpParameterTest, SolutionLimitOneAndCutoff) {
9971000

9981001
// Tests the interaction between cutoff and an additional limit.
9991002
TEST_P(IpParameterTest, NoSolutionsBelowCutoffEarlyTermination) {
1003+
if (GetParam().solver_type == SolverType::kGscip) {
1004+
GTEST_SKIP() << "This test does not work for SCIP v900";
1005+
}
10001006
if (!(GetParam().parameter_support.supports_cutoff)) {
10011007
// We have already tested that the right error message is returned.
10021008
return;

0 commit comments

Comments
 (0)