mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
test discovery: report underlying problem when DiscoveredTestDataHolder fails to initialize several times in a row
GitOrigin-RevId: 8e4b6bd77368a176e31c1565599c2ec49873007f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d8ff36703b
commit
4194713f90
@@ -2,6 +2,7 @@
|
||||
package com.intellij.execution.testDiscovery.indices;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.diagnostic.Attachment;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Couple;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
@@ -71,6 +72,8 @@ public final class DiscoveredTestDataHolder {
|
||||
|
||||
int iterations = 0;
|
||||
|
||||
Throwable lastProblem;
|
||||
|
||||
while (true) {
|
||||
++iterations;
|
||||
|
||||
@@ -104,10 +107,11 @@ public final class DiscoveredTestDataHolder {
|
||||
|
||||
PathKt.delete(basePath);
|
||||
// try another time
|
||||
lastProblem = throwable;
|
||||
}
|
||||
|
||||
if (iterations >= 3) {
|
||||
LOG.error("Unexpected circular initialization problem");
|
||||
LOG.error("Unexpected repeatable initialization problem", new Attachment("last-reported-problem", lastProblem));
|
||||
assert false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user