mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 15:06:56 +07:00
[refactoring] move MMappedFileStorageTest in apt package
+ to the MMappedFileStorage's package + small fixes along the way GitOrigin-RevId: 9cc7c8fd8069884a7dcef11a070245e0c68dff98
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a10c9228aa
commit
56d620a39e
@@ -1,10 +1,8 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.vfs.newvfs.persistent.mapped;
|
||||
package com.intellij.platform.util.io.storages.mmapped;
|
||||
|
||||
import com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage;
|
||||
import com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.Page;
|
||||
import com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.RegionAllocationAtomicityLock;
|
||||
import com.intellij.platform.util.io.storages.mmapped.MMappedFileStorageFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
@@ -280,8 +278,8 @@ public class MMappedFileStorageTest {
|
||||
.pageSize(PAGE_SIZE)
|
||||
.ifFileIsNotPageAligned(EXPAND_FILE)
|
||||
.open(storagePath)) {
|
||||
assertEquals(Files.size(storagePath),
|
||||
4 * PAGE_SIZE,
|
||||
assertEquals(4 * PAGE_SIZE,
|
||||
Files.size(storagePath),
|
||||
"Storage file should be expanded to page-aligned size");
|
||||
}
|
||||
finally {
|
||||
@@ -298,8 +296,8 @@ public class MMappedFileStorageTest {
|
||||
.pageSize(PAGE_SIZE)
|
||||
.ifFileIsNotPageAligned(CLEAN)
|
||||
.open(storagePath)) {
|
||||
assertEquals(Files.size(storagePath),
|
||||
0,
|
||||
assertEquals(0,
|
||||
Files.size(storagePath),
|
||||
"Storage file should be truncated");
|
||||
}
|
||||
finally {
|
||||
Reference in New Issue
Block a user