Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAP-260 fix: oap.storage.FilePersistenceTest.fsync #276

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ public FilePersistenceTest() {

@Test
public void fsync() {
Path path = testDirectoryFixture.testPath( "storage.json.gz" );
Path path = testDirectoryFixture.testPath( "fsync-storage.json.gz" );
var storage = new MemoryStorage<>( Identifier.<Bean>forId( b -> b.id ).build(), SERIALIZED );
try( var persistence = new FilePersistence<>( path, 10, storage ) ) {
persistence.preStart();
storage.store( new Bean( "123" ) );

assertEventually( 10, 200, () -> assertThat( path ).exists() );
assertEventually( 10, 2000, () -> assertThat( path ).exists() );
}
}

@Test
public void persist() {
Path path = testDirectoryFixture.testPath( "storage.json.gz" );
Path path = testDirectoryFixture.testPath( "persist-storage.json.gz" );
var storage1 = new MemoryStorage<>( Identifier.<Bean>forId( b -> b.id ).build(), SERIALIZED );
try( var persistence = new FilePersistence<>( path, 10, storage1 ) ) {
persistence.preStart();
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</repositories>

<properties>
<oap.project.version>21.16.3</oap.project.version>
<oap.project.version>21.16.4</oap.project.version>

<oap.deps.config.version>21.0.0</oap.deps.config.version>
<oap.deps.oap-teamcity.version>21.0.1</oap.deps.oap-teamcity.version>
Expand Down
Loading