diff --git a/tika-parsers/tika-parsers-ml/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java b/tika-parsers/tika-parsers-ml/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java index d6968a65d0..f8cae55d1c 100644 --- a/tika-parsers/tika-parsers-ml/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java +++ b/tika-parsers/tika-parsers-ml/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java @@ -38,9 +38,13 @@ public void recognise() throws Exception { try (InputStream is = getClass().getResourceAsStream("dl4j-vgg16-config.xml")) { config = new TikaConfig(is); } catch (Exception e) { - if (e.getMessage() != null && (e.getMessage().contains("Connection refused") || - e.getMessage().contains("connect timed out") || e.getMessage().contains("403"))) { - assumeTrue(false, "skipping test because of connection issue"); + if (e.getMessage() != null) { + if (e.getMessage().contains("Connection refused") || + e.getMessage().contains("connect timed out") || e.getMessage().contains("403")) { + assumeTrue(false, "skipping test because of connection issue"); + } else if (e.getMessage().contains("Illegal set of indices")) { + assumeTrue(false, "skipping test because of ci/cd/antiquated version of dl4j issues"); + } } throw e; }