Skip to content

Commit

Permalink
Fix a failing integration test (take 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Mar 6, 2024
1 parent e36926c commit 3f51bbc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,6 @@ void createConfluentQueryApicurio() throws IOException, RestClientException, Tim
Response ar = ArtifactUtils.getArtifact("default", subjectName, "branch=latest", 200);
assertEquals(rawSchema, ar.asString());
LOGGER.info(ar.asString());

TestUtils.waitFor("artifact created", Constants.POLL_INTERVAL, Constants.TIMEOUT_GLOBAL, () -> {
try {
return registryClient.groups().byGroupId("default").artifacts().byArtifactId(subjectName).versions().byVersionExpression("branch=latest").get().readAllBytes().length > 0;
} catch (WebApplicationException e) {
return false;
} catch (IOException e) {
throw new RuntimeException(e);
}
});
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ArtifactUtils {

public static Response getArtifact(String groupId, String artifactId, String version, int returnCode) {
return
BaseHttpUtils.getRequest(RestConstants.JSON, ApicurioRegistryBaseIT.getRegistryV3ApiUrl() + "/groups/" + encodeURIComponent(groupId) + "/artifacts/" + encodeURIComponent(artifactId) + "/" + version, returnCode);
BaseHttpUtils.getRequest(RestConstants.JSON, ApicurioRegistryBaseIT.getRegistryV3ApiUrl() + "/groups/" + encodeURIComponent(groupId) + "/artifacts/" + encodeURIComponent(artifactId) + "/versions/" + version, returnCode);
}

public static Response createArtifact(String groupId, String artifactId, String artifact, int returnCode) {
Expand Down

0 comments on commit 3f51bbc

Please sign in to comment.