mirror of https://github.com/apache/lucene.git
SOLR-2673: fix test dependent on order
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1150394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
19831e2208
commit
347ba7a172
|
@ -26,7 +26,13 @@ import java.io.IOException;
|
|||
* Test-case for RAMDirectoryFactory
|
||||
*/
|
||||
public class RAMDirectoryFactoryTest extends LuceneTestCase {
|
||||
public void testOpenReturnsTheSameForSamePath() throws IOException {
|
||||
|
||||
public void test() throws Exception {
|
||||
dotestOpenReturnsTheSameForSamePath();
|
||||
dotestOpenSucceedForEmptyDir();
|
||||
}
|
||||
|
||||
private void dotestOpenReturnsTheSameForSamePath() throws IOException {
|
||||
final Directory directory = new RefCntRamDirectory();
|
||||
RAMDirectoryFactory factory = new RAMDirectoryFactory() {
|
||||
@Override
|
||||
|
@ -45,7 +51,7 @@ public class RAMDirectoryFactoryTest extends LuceneTestCase {
|
|||
dir2.close();
|
||||
}
|
||||
|
||||
public void testOpenSucceedForEmptyDir() throws IOException {
|
||||
private void dotestOpenSucceedForEmptyDir() throws IOException {
|
||||
RAMDirectoryFactory factory = new RAMDirectoryFactory();
|
||||
Directory dir = factory.open("/fake/path");
|
||||
assertNotNull("RAMDirectoryFactory should create RefCntRamDirectory even if the path doen't lead " +
|
||||
|
|
Loading…
Reference in New Issue