mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
[tests] close zip file to fix test on Windows
GitOrigin-RevId: e337cacbfa873e6e56d251d4c185e7c4821eaff4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b6c6b45116
commit
ce98d98e08
@@ -102,12 +102,18 @@ class ReorderJarsTest {
|
||||
}
|
||||
|
||||
private fun testOldJarResourceImpl(file: Path, data: ByteArray) {
|
||||
val loader = JdkZipResourceFile(file, true, false, false).preload(file)
|
||||
assertThat(loader).isNotNull()
|
||||
val bytes = loader!!.getBytes("org/jetbrains/annotations/Nullable.class")
|
||||
assertThat(bytes).isNotNull()
|
||||
assertThat(bytes).hasSize(548)
|
||||
assertThat(data.contentEquals(bytes)).isTrue()
|
||||
val resourceFile = JdkZipResourceFile(file, true, false, false)
|
||||
try {
|
||||
val loader = resourceFile.preload(file)
|
||||
assertThat(loader).isNotNull()
|
||||
val bytes = loader!!.getBytes("org/jetbrains/annotations/Nullable.class")
|
||||
assertThat(bytes).isNotNull()
|
||||
assertThat(bytes).hasSize(548)
|
||||
assertThat(data.contentEquals(bytes)).isTrue()
|
||||
}
|
||||
finally {
|
||||
resourceFile.close()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user