mirror of https://github.com/apache/lucene.git
SOLR-12801: Fix TestSolrCloudWithKerberosAlt.
This commit is contained in:
parent
b6cbb8494e
commit
d96475a0bb
|
@ -64,7 +64,6 @@ public class KerberosTestServices {
|
||||||
Locale.setDefault(Locale.US);
|
Locale.setDefault(Locale.US);
|
||||||
}
|
}
|
||||||
|
|
||||||
File dir = null;
|
|
||||||
// There is time lag between selecting a port and trying to bind with it. It's possible that
|
// There is time lag between selecting a port and trying to bind with it. It's possible that
|
||||||
// another service captures the port in between which'll result in BindException.
|
// another service captures the port in between which'll result in BindException.
|
||||||
boolean bindException;
|
boolean bindException;
|
||||||
|
@ -76,7 +75,7 @@ public class KerberosTestServices {
|
||||||
kdc = getKdc(workDir);
|
kdc = getKdc(workDir);
|
||||||
kdc.start();
|
kdc.start();
|
||||||
} catch (BindException e) {
|
} catch (BindException e) {
|
||||||
FileUtils.deleteDirectory(dir); // clean directory
|
FileUtils.deleteDirectory(workDir); // clean directory
|
||||||
numTries++;
|
numTries++;
|
||||||
if (numTries == 3) {
|
if (numTries == 3) {
|
||||||
log.error("Failed setting up MiniKDC. Tried " + numTries + " times.");
|
log.error("Failed setting up MiniKDC. Tried " + numTries + " times.");
|
||||||
|
|
|
@ -21,6 +21,8 @@ import java.lang.invoke.MethodHandles;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
|
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
|
||||||
|
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.lucene.util.Constants;
|
import org.apache.lucene.util.Constants;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
|
@ -46,6 +48,7 @@ import org.slf4j.LoggerFactory;
|
||||||
})
|
})
|
||||||
|
|
||||||
@LuceneTestCase.Slow
|
@LuceneTestCase.Slow
|
||||||
|
@ThreadLeakLingering(linger = 10000) // minikdc has some lingering threads
|
||||||
public class TestSolrCloudWithKerberosAlt extends SolrCloudTestCase {
|
public class TestSolrCloudWithKerberosAlt extends SolrCloudTestCase {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
Loading…
Reference in New Issue