mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Statistics: do not persist in tests (IDEA-CR-22562)
This commit is contained in:
+10
-8
@@ -160,16 +160,18 @@ public class ApplicationStatisticsPersistenceComponent extends ApplicationStatis
|
||||
|
||||
@Override
|
||||
public void initComponent() {
|
||||
MessageBusConnection connection = ApplicationManager.getApplication().getMessageBus().connect();
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
MessageBusConnection connection = ApplicationManager.getApplication().getMessageBus().connect();
|
||||
|
||||
connection.subscribe(ProjectManager.TOPIC, new ProjectManagerListener() {
|
||||
@Override
|
||||
public void projectOpened(Project project) {
|
||||
JobScheduler.getScheduler().schedule(() -> UsagesCollector.doPersistProjectUsages(project), DELAY_IN_MIN, TimeUnit.MINUTES);
|
||||
}
|
||||
});
|
||||
connection.subscribe(ProjectManager.TOPIC, new ProjectManagerListener() {
|
||||
@Override
|
||||
public void projectOpened(Project project) {
|
||||
JobScheduler.getScheduler().schedule(() -> UsagesCollector.doPersistProjectUsages(project), DELAY_IN_MIN, TimeUnit.MINUTES);
|
||||
}
|
||||
});
|
||||
|
||||
persistPeriodically();
|
||||
persistPeriodically();
|
||||
}
|
||||
}
|
||||
|
||||
private static void persistPeriodically() {
|
||||
|
||||
Reference in New Issue
Block a user