VIVO-870 Implement UpdateStatementsTask.
Also add the listener to support it and get rid of the last of the vestigial classes.
This commit is contained in:
parent
0602406c53
commit
dee53e3aac
24 changed files with 845 additions and 1317 deletions
|
@ -1,38 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.search.indexing;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
|
||||
|
||||
|
||||
public class IndexBuilderThreadTest extends AbstractTestClass {
|
||||
@Ignore
|
||||
@Test
|
||||
public void testStoppingTheThread(){
|
||||
setLoggerLevel(IndexBuilder.class, Level.OFF);
|
||||
|
||||
IndexBuilder ib = new IndexBuilder();
|
||||
Assert.assertNotSame(Thread.State.NEW, ib.getState() );
|
||||
Assert.assertNotSame(Thread.State.TERMINATED, ib.getState() );
|
||||
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
Assert.fail(e.getMessage());
|
||||
}
|
||||
ib.stopIndexingThread();
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
Assert.fail(e.getMessage());
|
||||
}
|
||||
Assert.assertFalse(ib.isAlive());
|
||||
Assert.assertSame(Thread.State.TERMINATED, ib.getState() );
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue