Skip to content

Test failures in AnalyseSkeletonWrapperTest after update to scijava 29 and 30 #273

Open
@mdoube

Description

@mdoube

Describe the bug
Test fails with An error occurred while opening the image instead of Image format is not recognized

Expected behavior
Test passes

Environment
commit 4bc1bd5
scijava 29.2.1

Additional context
The failing test

	@Test
	public void testBadFormatIntensityImageCancelsPlugin() throws Exception {
		// SETUP
		final ImagePlus imagePlus = IJ.createImage("test", 3, 3, 3, 8);
		final File exceptionFile = mock(File.class);
		when(exceptionFile.getAbsolutePath()).thenReturn("file.foo");
		when(MOCK_UI.chooseFile(any(File.class), anyString())).thenReturn(
			exceptionFile);

		// EXECUTE
		final CommandModule module = command().run(
			AnalyseSkeletonWrapper.class, true, "inputImage", imagePlus,
			"pruneCycleMethod", "Lowest intensity voxel").get();

		// VERIFY
		assertTrue("Plugin should have cancelled", module.isCanceled());
		assertEquals("Cancel reason is incorrect", "Image format is not recognized",
			module.getCancelReason());
	}

This appears in the console:

[ERROR] Cannot create plugin: class='org.scijava.io.http.HTTPHandle', priority=0.0, enabled=true, pluginType=DataHandle

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions