Skip to content

Commit

Permalink
fixing checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
elopezcastro authored Nov 10, 2023
1 parent e53ff49 commit 20cd48a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,19 @@ private static void configureWireMockForRetries() throws JsonProcessingException
PureModelContextData data = PureModelContextData.newPureModelContextData(new Protocol(), new PureModelContextPointer(), Lists.fixedSize.empty());
String pmcdJson = objectMapper.writeValueAsString(data);

WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion="+CLIENT_VERSION)
WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION)
.inScenario("RETRY_FAILURES")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(WireMock.aResponse().withStatus(503).withBody("a failure"))
.willSetStateTo("FAILED_1"));

WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion="+CLIENT_VERSION)
WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION)
.inScenario("RETRY_FAILURES")
.whenScenarioStateIs("FAILED_1")
.willReturn(WireMock.aResponse().withStatus(503).withBody("a failure"))
.willSetStateTo("FAILED_2"));

WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion="+CLIENT_VERSION)
WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION)
.inScenario("RETRY_FAILURES")
.whenScenarioStateIs("FAILED_2")
.willReturn(WireMock.okJson(pmcdJson))
Expand Down Expand Up @@ -249,13 +249,13 @@ private static void configureWireMockForRetries() throws JsonProcessingException
WireMock.stubFor(WireMock.get("/sdlc/api/projects/proj-1235/workspaces/workspaceAbc/revisions/HEAD/upstreamProjects")
.willReturn(WireMock.okJson("[{\"projectId\": \"org.finos.legend.dependency:models\",\"versionId\": \"2.0.1\"}]")));

WireMock.stubFor(WireMock.get("/alloy/projects/org.finos.legend.dependency/models/versions/2.0.1/pureModelContextData?clientVersion="+CLIENT_VERSION)
WireMock.stubFor(WireMock.get("/alloy/projects/org.finos.legend.dependency/models/versions/2.0.1/pureModelContextData?clientVersion=" + CLIENT_VERSION)
.willReturn(WireMock.okJson(pmcdJsonDep)));
}

private static void configureWireMockForNoRetries() throws JsonProcessingException
{
WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion="+CLIENT_VERSION)
WireMock.stubFor(WireMock.get("/alloy/projects/groupId/artifactId/versions/1.0.0/pureModelContextData?clientVersion=" + CLIENT_VERSION)
.willReturn(WireMock.aResponse().withStatus(400).withBody("a failure")));
}
}

0 comments on commit 20cd48a

Please sign in to comment.