Skip to content

Commit

Permalink
Fix toggling tests due to dependency changes a few months ago. Resolv…
Browse files Browse the repository at this point in the history
…er repo isn't accessible anymore, so lib cannot be found:

Could not find artifact joda-time:joda-time:jar:2.5, try downloading from http://oss.sonatype.org/content/repositories/joda-releases
  • Loading branch information
rzo1 committed Feb 2, 2024
1 parent 61c6324 commit 1ea0979
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static Archive<?> ear() {
Maven.configureResolver()
.workOffline()
.withClassPathResolution(true)
.resolve("joda-time:joda-time:2.5")
.resolve("joda-time:joda-time:2.10.10")
.using(new AcceptScopesStrategy(ScopeType.COMPILE, ScopeType.RUNTIME))
.asFile()
)
Expand All @@ -63,6 +63,6 @@ public void checkIfWasCorretlyLoaded() throws IOException {
// embedded case uses the classpath for a lot of reasons
assumeFalse(System.getProperty("openejb.arquillian.adapter", "embedded").contains("embedded"));
final String slurp = IO.slurp(new URL(url.toExternalForm() + (url.getPath().isEmpty() ? "/broken-web/" : "") + "joda"));
assertTrue(slurp.endsWith("broken-web/WEB-INF/lib/joda-time-2.5.jar"));
assertTrue(slurp.endsWith("broken-web/WEB-INF/lib/joda-time-2.10.10.jar"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static Archive<?> ear() {
final File[] joda = Maven.configureResolver()
.workOffline()
.withClassPathResolution(true)
.resolve("joda-time:joda-time:2.5")
.resolve("joda-time:joda-time:2.10.10")
.using(new AcceptScopesStrategy(ScopeType.COMPILE, ScopeType.RUNTIME))
.asFile();
return ShrinkWrap.create(EnterpriseArchive.class, "broken.ear")
Expand All @@ -70,7 +70,7 @@ public static Archive<?> ear() {
public void checkIfWasCorretlyLoaded() throws IOException {
assumeFalse(System.getProperty("openejb.arquillian.adapter", "embedded").contains("embedded"));
final String slurp = IO.slurp(new URL(url.toExternalForm() + (url.getPath().isEmpty() ? "/broken-web/" : "") + "joda"));
assertTrue(slurp.endsWith("broken-web/WEB-INF/lib/joda-time-2.5.jar"));
assertFalse(slurp.endsWith("broken/lib/joda-time-2.5.jar")); // useless cause of the previous but to make it obvious
assertTrue(slurp.endsWith("broken-web/WEB-INF/lib/joda-time-2.10.10.jar"));
assertFalse(slurp.endsWith("broken/lib/joda-time-2.10.10.jar")); // useless cause of the previous but to make it obvious
}
}

0 comments on commit 1ea0979

Please sign in to comment.