Skip to content

Commit 632707b

Browse files
committed
tst
1 parent be54f8a commit 632707b

File tree

2 files changed

+10
-6
lines changed
  • plugins
    • core/jetbrains-community/tst/software/aws/toolkits/jetbrains/core/credentials/profiles
    • toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/utils

2 files changed

+10
-6
lines changed

plugins/core/jetbrains-community/tst/software/aws/toolkits/jetbrains/core/credentials/profiles/ProfileWatcherTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ class ProfileWatcherTest {
6363
assertFileChange {
6464
profileFile.parentFile.mkdirs()
6565
profileFile.writeText("Test")
66+
profileFile.parentFile.deleteRecursively()
6667
}
67-
} catch (e: Exception) {
68-
if (e.cause is IOException) {
68+
} catch (e: Error) {
69+
if (e is AssertionFailedError) {
70+
// suppress
71+
} else if (e.cause is IOException) {
6972
throw AssumptionViolatedException("native file watcher is not executable; possibly an issue with intellij-platform-gradle-plugin", e)
70-
} else if (e.cause !is AssertionFailedError) {
71-
// suppress otherwise
72-
throw e
7373
}
7474
}
7575
}

plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/utils/JavaTestUtils.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ private fun HeavyJavaCodeInsightTestFixtureRule.copyGradleFiles() {
171171
val gradleRoot = findGradlew()
172172

173173
// annoying and can't repro locally
174-
VfsRootAccess.allowRootAccess(this.fixture.testRootDisposable, gradleRoot.toRealPath().toString())
174+
val gradleUserHome = Paths.get(System.getProperty("user.home"), ".gradle").toRealPath()
175+
if (gradleUserHome.exists()) {
176+
println("Allowing vfs access to $gradleUserHome")
177+
VfsRootAccess.allowRootAccess(this.fixture.testRootDisposable, gradleUserHome.toString())
178+
}
175179

176180
val gradleFiles = setOf("gradle/wrapper", "gradlew.bat", "gradlew")
177181

0 commit comments

Comments
 (0)