mirror of https://github.com/apache/lucene.git
better messages when ScriptTransform fails on init (add back 1 exception ignore in case JVM doesn't support Rhino)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1303568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3e64aa58de
commit
f3ffdf3a68
|
@ -52,7 +52,9 @@ public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
|
|||
sep.init(context);
|
||||
sep.applyTransformer(map);
|
||||
assertEquals(map.get("name"), "Hello Scott");
|
||||
} catch (DataImportHandlerException e) {
|
||||
} catch (DataImportHandlerException e) {
|
||||
assumeFalse("This JVM does not have Rhino installed. Test Skipped.", e
|
||||
.getMessage().startsWith("Cannot load Script Engine for language"));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +100,9 @@ public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
|
|||
config.readFromXml((Element) document.getElementsByTagName("dataConfig")
|
||||
.item(0));
|
||||
assertTrue(config.script.text.indexOf("checkNextToken") > -1);
|
||||
} catch (DataImportHandlerException e) {
|
||||
} catch (DataImportHandlerException e) {
|
||||
assumeFalse("This JVM does not have Rhino installed. Test Skipped.", e
|
||||
.getMessage().startsWith("Cannot load Script Engine for language"));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +129,9 @@ public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
|
|||
map.put("nextToken", "");
|
||||
sep.applyTransformer(map);
|
||||
assertNull(map.get("$hasMore"));
|
||||
} catch (DataImportHandlerException e) {
|
||||
} catch (DataImportHandlerException e) {
|
||||
assumeFalse("This JVM does not have Rhino installed. Test Skipped.", e
|
||||
.getMessage().startsWith("Cannot load Script Engine for language"));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue