mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable PasswordConversionEnforcer in tests
This commit is contained in:
@@ -64,8 +64,6 @@ internal class DoNotSaveDefaultsTest {
|
||||
}
|
||||
|
||||
private suspend fun doTest(componentManager: ComponentManagerImpl) {
|
||||
val useModCountOldValue = System.getProperty("store.save.use.modificationCount")
|
||||
|
||||
// wake up (edt, some configurables want read action)
|
||||
withContext(AppUIExecutor.onUiThread().coroutineDispatchingContext()) {
|
||||
val picoContainer = componentManager.picoContainer
|
||||
@@ -90,8 +88,8 @@ internal class DoNotSaveDefaultsTest {
|
||||
propertyComponent.unsetValue("CommitChangeListDialog.DETAILS_SPLITTER_PROPORTION_2")
|
||||
propertyComponent.unsetValue("ts.lib.d.ts.version")
|
||||
propertyComponent.unsetValue("nodejs_interpreter_path.stuck_in_default_project")
|
||||
propertyComponent.unsetValue("tasks.pass.word.conversion.enforced")
|
||||
|
||||
val useModCountOldValue = System.getProperty("store.save.use.modificationCount")
|
||||
try {
|
||||
System.setProperty("store.save.use.modificationCount", "false")
|
||||
componentManager.stateStore.save(isForceSavingAllSettings = true)
|
||||
|
||||
+6
-1
@@ -3,12 +3,17 @@ package com.intellij.tasks.config;
|
||||
|
||||
import com.intellij.ide.ApplicationInitializedListener;
|
||||
import com.intellij.ide.util.PropertiesComponent;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
|
||||
public class PasswordConversionEnforcer implements ApplicationInitializedListener {
|
||||
final class PasswordConversionEnforcer implements ApplicationInitializedListener {
|
||||
private static final String ENFORCED = "tasks.pass.word.conversion.enforced";
|
||||
|
||||
@Override
|
||||
public void componentsInitialized() {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PropertiesComponent.getInstance().isValueSet(ENFORCED)) {
|
||||
RecentTaskRepositories.getInstance().getState();
|
||||
PropertiesComponent.getInstance().setValue(ENFORCED, true);
|
||||
|
||||
Reference in New Issue
Block a user