From 284aaef7100d3b8a0c456e92de3ab52ecdbb62fa Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 15 Feb 2020 11:54:45 +0300 Subject: [PATCH] Fix ConfigImportHelperTest: always create config_dir/options/other.xml Since 17eb4db1 we use a more precise way to identify the config directory: it should contain one of common options files inside. The test used to create these files only for some tests. Relates to IDEA-199232 GitOrigin-RevId: b7513b80567e89cd6b34cf456271e4d43d4519d8 --- .../intellij/openapi/application/ConfigImportHelperTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/application/ConfigImportHelperTest.kt b/platform/platform-tests/testSrc/com/intellij/openapi/application/ConfigImportHelperTest.kt index 4e8ce3c1d0f0..34743611b5c4 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/application/ConfigImportHelperTest.kt +++ b/platform/platform-tests/testSrc/com/intellij/openapi/application/ConfigImportHelperTest.kt @@ -159,14 +159,14 @@ class ConfigImportHelperTest : BareTestFixtureTestCase() { .isDirectoryNotContaining { it.fileName == oldPluginZip.fileName } } - private fun createConfigDir(version: String, modern: Boolean = version >= "2020.1", product: String = "IntelliJIdea", storageTS: Long = 0): Path { + private fun createConfigDir(version: String, modern: Boolean = version >= "2020.1", product: String = "IntelliJIdea", storageTS: Long = 100): Path { val path = when { modern -> PathManager.getDefaultConfigPathFor("${product}${version}") SystemInfo.isMac -> "${SystemProperties.getUserHome()}/Library/Preferences/${product}${version}" else -> "${SystemProperties.getUserHome()}/.${product}${version}/config" } val dir = Files.createDirectories(memoryFs.fs.getPath(path).normalize()) - if (storageTS > 0) writeStorageFile(dir, storageTS) + writeStorageFile(dir, storageTS) return dir }