Skip to content

Commit 52a9258

Browse files
committed
Stop pinning ImageJ version
Otherwise it cannot be overridden (e.g. by the pom-scijava mega-melt) without the test failing.
1 parent c93255f commit 52a9258

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

pom.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@
9696
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
9797

9898
<prettytime.version>4.0.1.Final</prettytime.version>
99-
100-
<!-- NB: Pin imagej1 version for test -->
101-
<imagej1.version>1.54b</imagej1.version>
10299
</properties>
103100

104101
<repositories>

src/test/java/org/scijava/search/SourceFinderTest.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929
package org.scijava.search;
3030

31-
import static org.junit.Assert.assertEquals;
31+
import static org.junit.Assert.assertNotNull;
3232
import static org.junit.Assert.assertTrue;
3333

3434
import java.net.URL;
@@ -66,6 +66,7 @@ public void testSourceLocationDefaultSourceDirectory()
6666
throws SourceNotFoundException
6767
{
6868
URL url = SourceFinder.sourceLocation(Context.class, logService);
69+
assertNotNull(url);
6970
String expected = "^/scijava/scijava-common/blob/scijava-common-[0-9\\.]+" +
7071
"/src/main/java/org/scijava/Context\\.java$";
7172
String actual = url.getPath();
@@ -82,8 +83,9 @@ public void testSourceLocationOverriddenSourceDirectory()
8283
throws SourceNotFoundException
8384
{
8485
URL url = SourceFinder.sourceLocation(IJ.class, logService);
85-
// NB: we expect the version as pinned in pom.xml
86-
String expected = "/imagej/ImageJ/blob/v1.54b/ij/IJ.java";
87-
assertEquals(expected, url.getPath());
86+
assertNotNull(url);
87+
String expected = "^/imagej/ImageJ/blob/v1\\.[0-9a-z]+/ij/IJ\\.java$";
88+
String actual = url.getPath();
89+
assertTrue("Unexpected path: " + actual, actual.matches(expected));
8890
}
8991
}

0 commit comments

Comments
 (0)