/** * @param configuration The test configuration to use when initializing. * @see ImmutableTestConfiguration */ protected void init(TestConfiguration configuration) { if ( testResourceManager == null ) { testResourceManager = new DefaultTestResourceManager( configuration, this.getClass() ); } testResourceManager.openSessionFactory(); }
@Override public final void openSessionFactory() { getTestResourceManager().openSessionFactory(); }
@Before public void setUp() throws Exception { for ( int i = 0 ; i < getExpectedNumberOfNodes() ; ++i ) { DefaultTestResourceManager resourceManager = new DefaultTestResourceManager( this, getClass() ); resourceManagers.add( resourceManager ); resourceManager.openSessionFactory(); if ( alreadySelectedBaseIndexDir == null ) { // Set the base index dir to the dir selected for the first search factory this.alreadySelectedBaseIndexDir = resourceManager.getBaseIndexDir().toAbsolutePath().toString(); } } }
private void buildSlaveSessionFactory() throws Exception { if ( slaveResources != null ) { throw new IllegalStateException( "Slave SessionFactory already created" ); } HashMap<String, Object> slaveConfiguration = new HashMap<String,Object>(); configureSlave( slaveConfiguration ); TestConfiguration slaveTestConfiguration = new ImmutableTestConfiguration( slaveConfiguration, getAnnotatedClasses() ); slaveResources = new DefaultTestResourceManager( slaveTestConfiguration, this.getClass() ); slaveResources.openSessionFactory(); }
@Before public void setUp() throws Exception { getTestResourceManager().openSessionFactory(); }