use of org.apache.druid.js.JavaScriptConfig in project druid by druid-io.
the class JavaScriptAggregatorTest method testJavaScriptDisabledFactorizeBuffered.
@Test
public void testJavaScriptDisabledFactorizeBuffered() {
final JavaScriptAggregatorFactory factory = new JavaScriptAggregatorFactory("foo", ImmutableList.of("foo"), SCRIPT_DOUBLE_SUM.get("fnAggregate"), SCRIPT_DOUBLE_SUM.get("fnReset"), SCRIPT_DOUBLE_SUM.get("fnCombine"), new JavaScriptConfig(false));
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("JavaScript is disabled");
factory.factorizeBuffered(DUMMY_COLUMN_SELECTOR_FACTORY);
Assert.assertTrue(false);
}
use of org.apache.druid.js.JavaScriptConfig in project druid by druid-io.
the class JavaScriptAggregatorTest method testJavaScriptDisabledFactorize.
@Test
public void testJavaScriptDisabledFactorize() {
final JavaScriptAggregatorFactory factory = new JavaScriptAggregatorFactory("foo", ImmutableList.of("foo"), SCRIPT_DOUBLE_SUM.get("fnAggregate"), SCRIPT_DOUBLE_SUM.get("fnReset"), SCRIPT_DOUBLE_SUM.get("fnCombine"), new JavaScriptConfig(false));
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("JavaScript is disabled");
factory.factorize(DUMMY_COLUMN_SELECTOR_FACTORY);
Assert.assertTrue(false);
}
Aggregations