debugging blinking test

This commit is contained in:
Dmitry Avdeev
2013-01-16 15:56:55 +04:00
parent e13e339a95
commit e06f2dbe6b
2 changed files with 13 additions and 1 deletions
@@ -265,7 +265,13 @@ public class InspectionProfileTest extends LightIdeaTestCase {
}
profile.writeExternal(new Element("profile"));
List<InspectionProfileEntry> initializedTools = getInitializedTools(profile);
assertEquals(initializedTools.toString(), 1, initializedTools.size());
if (initializedTools.size() != 1) {
for (InspectionProfileEntry initializedTool : initializedTools) {
System.out.println(initializedTool.getShortName());
((InspectionToolWrapper)initializedTool).instantated.printStackTrace();
}
fail();
}
}
public void testInspectionInitializationForSerialization() throws Exception {
@@ -67,6 +67,9 @@ public abstract class InspectionToolWrapper<T extends InspectionProfileEntry, E
public T getTool() {
if (myTool == null) {
//noinspection unchecked
if (ApplicationManager.getApplication().isUnitTestMode()) {
instantated = new Throwable();
}
myTool = (T)myEP.instantiateTool();
if (!myTool.getShortName().equals(myEP.getShortName())) {
LOG.error("Short name not matched for " +
@@ -80,6 +83,9 @@ public abstract class InspectionToolWrapper<T extends InspectionProfileEntry, E
return myTool;
}
// todo remove it
public Throwable instantated;
@Override
public boolean isInitialized() {
return myTool != null;