Fix TSAN error.

PiperOrigin-RevId: 623926109
This commit is contained in:
Francis Tsui
2024-04-11 13:41:58 -07:00
committed by Copybara-Service
parent 033d88ca24
commit 7bc8677590
+2 -1
View File
@@ -14,6 +14,7 @@
#include "sharing/nearby_file_handler.h"
#include <atomic>
#include <cstdio>
#include <filesystem> // NOLINT(build/c++17)
#include <vector>
@@ -115,7 +116,7 @@ TEST(NearbyFileHandler, DeleteMultipleFilesFromDisk) {
}
TEST(NearbyFileHandler, TestCallback) {
bool received_callback = false;
std::atomic_bool received_callback = false;
NearbyFileHandler nearby_file_handler;
std::filesystem::path test_file =
std::filesystem::temp_directory_path() / "nearby_nfh_test_abc.jpg";