| 1 16 package scriptella.execution; 17 18 import scriptella.AbstractTestCase; 19 import scriptella.configuration.ConfigurationFactory; 20 21 import java.util.HashMap ; 22 import java.util.Map ; 23 24 30 public class LazyInitConnectionTest extends AbstractTestCase { 31 private Map <String ,String > props; 32 33 protected ConfigurationFactory newConfigurationFactory() { 34 ConfigurationFactory cf = super.newConfigurationFactory(); 35 cf.setExternalProperties(props); 36 return cf; 37 } 38 39 public void test() throws EtlExecutorException { 40 props=new HashMap <String , String >(); 42 props.put("lazy", "true"); 43 EtlExecutor exec = newEtlExecutor(); 44 exec.execute(); 45 props.put("lazy", "false"); 47 exec = newEtlExecutor(); 48 try { 49 exec.execute(); 50 fail("Script should fail in a greedy init mode."); 51 } catch (EtlExecutorException e) { 52 } 54 55 } 56 } 57 | Popular Tags |