mirror of https://github.com/apache/lucene.git
Test fix for DIH TestScriptTransformer: Lucene-Solr-Maven-trunk build#397 produced an exception with the message "<script> can be used only in java 6 or above Processing Document # 1", while the test was only ignoring those exceptions with the exact message "<script> can be used only in java 6 or above" - switched the test for this to require the expected message as a prefix rather than exact equality.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1291958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
208e9626d4
commit
2421399023
|
@ -53,7 +53,8 @@ public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
|
|||
sep.applyTransformer(map);
|
||||
assertEquals(map.get("name"), "Hello Scott");
|
||||
} catch (DataImportHandlerException e) {
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)", "<script> can be used only in java 6 or above".equals(e.getMessage()));
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)",
|
||||
e.getMessage().startsWith("<script> can be used only in java 6 or above"));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +86,8 @@ public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
|
|||
sep.applyTransformer(map);
|
||||
assertEquals(map.get("name"), "Hello Scott");
|
||||
} catch (DataImportHandlerException e) {
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)", "<script> can be used only in java 6 or above".equals(e.getMessage()));
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)",
|
||||
e.getMessage().startsWith("<script> can be used only in java 6 or above"));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +103,8 @@ public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
|
|||
.item(0));
|
||||
assertTrue(config.script.text.indexOf("checkNextToken") > -1);
|
||||
} catch (DataImportHandlerException e) {
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)", "<script> can be used only in java 6 or above".equals(e.getMessage()));
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)",
|
||||
e.getMessage().startsWith("<script> can be used only in java 6 or above"));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +132,8 @@ public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
|
|||
sep.applyTransformer(map);
|
||||
assertNull(map.get("$hasMore"));
|
||||
} catch (DataImportHandlerException e) {
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)", "<script> can be used only in java 6 or above".equals(e.getMessage()));
|
||||
assumeFalse("JRE does not contain a JavaScript engine (OpenJDK)",
|
||||
e.getMessage().startsWith("<script> can be used only in java 6 or above"));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue