Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
WilyTiger committed Sep 26, 2024
1 parent e64e861 commit 5b28d6d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cloud/filestore/libs/vfs_fuse/fs_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1439,9 +1439,15 @@ Y_UNIT_TEST_SUITE(TFileSystemTest)
std::atomic_bool releaseFinished = false;
std::atomic_uint handlerCalled = 0;
auto destroyFinished = NewPromise<void>();
auto counters = bootstrap.Counters->FindSubgroup("component", "fs_ut")
->FindSubgroup("request", "DestroyHandle");
bootstrap.Service->SetHandlerDestroyHandle(
[&, destroyFinished](auto callContext, auto request) mutable
{
UNIT_ASSERT_VALUES_EQUAL(
1,
counters->GetCounter("InProgress")->GetAtomic());

UNIT_ASSERT_VALUES_EQUAL(
FileSystemId,
callContext->FileSystemId);
Expand Down Expand Up @@ -1475,6 +1481,7 @@ Y_UNIT_TEST_SUITE(TFileSystemTest)

destroyFinished.GetFuture().Wait(WaitTimeout);
UNIT_ASSERT_VALUES_EQUAL(2U, handlerCalled.load());
UNIT_ASSERT_VALUES_EQUAL(0, counters->GetCounter("InProgress")->GetAtomic());
}

Y_UNIT_TEST(ShouldRetryDestroyIfNotSuccessDuringAsyncProcessing)
Expand Down

0 comments on commit 5b28d6d

Please sign in to comment.