Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/ci-setup-solvers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ set -e
# get base directory of the repository
REPO_DIR=$(dirname "$(dirname "$(readlink -f "$0")")")

RUN apt-get update && apt-get install -y \
build-essential \
gcc \
g++ \
python3-dev \
&& rm -rf /var/lib/apt/lists/*

# make sure to install to the gams conda env
source /opt/conda/bin/activate gams

Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-gams.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apt-get install curl --yes
# iisaa/gams-docker (https://github.com/iiasa/gams-docker/blob/master/Dockerfile, GPL-3.0 licensed)

# Configure the GAMS version here
GAMS_VERSION_RELEASE_MAJOR=49.7
GAMS_VERSION_RELEASE_MAJOR=52.5
GAMS_VERSION_HOTFIX=0

# download the self-extracting archive to /opt/gams/gams.exe and run/extract it
Expand Down
17 changes: 16 additions & 1 deletion src/test/java/edu/kit/provideq/toolbox/api/ApiTestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,18 @@ public static <InputT, ResultT> ProblemDto<InputT, ResultT> trySolveFor(
})
.returnResult()
.getResponseBody();
builder.append("Fetched problem: " + problemDto + "\n");

if (problemDto == null) {
System.out.println("Testcase with id " + problemId
+ " will terminate because problemDto is null");
System.out.println("problemType: " + problemType);
}
assertNotNull(problemDto);

builder.append("Fetched problem: " + problemDto + "\n");

if (problemDto.getState() == ProblemState.SOLVED) {
System.out.println(problemId + " solved successful.");
break;
}

Expand All @@ -174,6 +181,12 @@ public static <InputT, ResultT> ProblemDto<InputT, ResultT> trySolveFor(
.getResponseBody();
builder.append("Fetched sub problem: " + subProblemDto + "\n");

if (subProblemDto == null) {
System.out.println("Subproblem with id " + subProblemId
+ " will terminate because subProblemDto is null");
System.out.println("subProblem: " + subProblem);
System.out.println("Log: " + builder);
}
assertNotNull(subProblemDto);
}
}
Expand All @@ -187,6 +200,8 @@ public static <InputT, ResultT> ProblemDto<InputT, ResultT> trySolveFor(
}

if (hasTimeout.get()) {
System.out.println("Stopping testcase due to timeout.");
System.out.println("log: " + builder);
throw new IllegalStateException("Problem did not solve in time: " + problemDto);
}
}
Expand Down