|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util._TestUtil
public class _TestUtil
Constructor Summary | |
---|---|
_TestUtil()
|
Method Summary | ||
---|---|---|
static boolean |
anyFilesExceptWriteLock(org.apache.lucene.store.Directory dir)
|
|
static String |
arrayToString(int[] array)
Deprecated. -- in 3.0 we can use Arrays.toString instead |
|
static String |
arrayToString(Object[] array)
Deprecated. -- in 3.0 we can use Arrays.toString instead |
|
static
|
assertAttributeReflection(org.apache.lucene.util.AttributeImpl att,
Map<String,T> reflectedValues)
Checks some basic behaviour of an AttributeImpl |
|
static void |
assertEquals(org.apache.lucene.search.TopDocs expected,
org.apache.lucene.search.TopDocs actual)
|
|
static org.apache.lucene.index.CheckIndex.Status |
checkIndex(org.apache.lucene.store.Directory dir)
This runs the CheckIndex tool on the index in. |
|
static File |
createTempFile(String prefix,
String suffix,
File directory)
insecure, fast version of File.createTempFile uses Random instead of SecureRandom. |
|
static File |
getTempDir(String desc)
Returns temp dir, based on String arg in its name; does not create the directory. |
|
static void |
keepFullyDeletedSegments(org.apache.lucene.index.IndexWriter w)
|
|
static int |
nextInt(Random r,
int start,
int end)
start and end are BOTH inclusive |
|
static void |
randomFixedLengthUnicodeString(Random random,
char[] chars,
int offset,
int length)
Fills provided char[] with valid random unicode code unit sequence. |
|
static String |
randomRealisticUnicodeString(Random r)
Returns random string, all codepoints within the same unicode block. |
|
static String |
randomRealisticUnicodeString(Random r,
int maxLength)
Returns random string, all codepoints within the same unicode block. |
|
static String |
randomSimpleString(Random r)
|
|
static String |
randomUnicodeString(Random r)
Returns random string, including full unicode range. |
|
static String |
randomUnicodeString(Random r,
int maxLength)
Returns a random string up to a certain length. |
|
static void |
reduceOpenFiles(org.apache.lucene.index.IndexWriter w)
just tries to configure things to keep the open file count lowish |
|
static void |
rmDir(File dir)
Deletes a directory and everything underneath it. |
|
static void |
syncConcurrentMerges(org.apache.lucene.index.IndexWriter writer)
|
|
static void |
syncConcurrentMerges(org.apache.lucene.index.MergeScheduler ms)
|
|
static void |
unzip(File zipName,
File destDir)
Convenience method: Unzip zipName + ".zip" under destDir, removing destDir first |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public _TestUtil()
Method Detail |
---|
public static File getTempDir(String desc)
public static void rmDir(File dir) throws IOException
IOException
public static void unzip(File zipName, File destDir) throws IOException
IOException
public static void syncConcurrentMerges(org.apache.lucene.index.IndexWriter writer)
public static void syncConcurrentMerges(org.apache.lucene.index.MergeScheduler ms)
public static org.apache.lucene.index.CheckIndex.Status checkIndex(org.apache.lucene.store.Directory dir) throws IOException
IOException
@Deprecated public static String arrayToString(int[] array)
@Deprecated public static String arrayToString(Object[] array)
public static String randomSimpleString(Random r)
public static String randomUnicodeString(Random r)
public static String randomUnicodeString(Random r, int maxLength)
public static void randomFixedLengthUnicodeString(Random random, char[] chars, int offset, int length)
public static String randomRealisticUnicodeString(Random r)
public static String randomRealisticUnicodeString(Random r, int maxLength)
public static int nextInt(Random r, int start, int end)
public static boolean anyFilesExceptWriteLock(org.apache.lucene.store.Directory dir) throws IOException
IOException
public static void reduceOpenFiles(org.apache.lucene.index.IndexWriter w)
public static <T> void assertAttributeReflection(org.apache.lucene.util.AttributeImpl att, Map<String,T> reflectedValues)
reflectedValues
- contains a map with "AttributeClass#key" as valuespublic static void keepFullyDeletedSegments(org.apache.lucene.index.IndexWriter w)
public static File createTempFile(String prefix, String suffix, File directory) throws IOException
IOException
public static void assertEquals(org.apache.lucene.search.TopDocs expected, org.apache.lucene.search.TopDocs actual)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |