From 347ba7a17211fc1e052c781b7e8b1d3a82a481b2 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sun, 24 Jul 2011 15:05:08 +0000 Subject: [PATCH] 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 --- .../org/apache/solr/core/RAMDirectoryFactoryTest.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java b/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java index 9ca8583ea87..485bcf65c61 100644 --- a/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java +++ b/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java @@ -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 " +