[CAS][Tests] Fix unit tests that hangs on two cores (#154151)

This commit is contained in:
Steven Wu 2025-08-19 08:21:34 -07:00 committed by GitHub
parent 8255d240a9
commit 30c5c48d87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -269,8 +269,7 @@ TEST_P(CASTest, NodesBig) {
ASSERT_THAT_ERROR(CAS->validate(CAS->getID(ID)), Succeeded()); ASSERT_THAT_ERROR(CAS->validate(CAS->getID(ID)), Succeeded());
} }
// FIXME: Re-enable the test. #if LLVM_ENABLE_THREADS
#if 0
/// Common test functionality for creating blobs in parallel. You can vary which /// Common test functionality for creating blobs in parallel. You can vary which
/// cas instances are the same or different, and the size of the created blobs. /// cas instances are the same or different, and the size of the created blobs.
static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2, static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2,
@ -318,10 +317,10 @@ static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2,
DefaultThreadPool Threads; DefaultThreadPool Threads;
for (unsigned I = 0; I < BlobCount; ++I) { for (unsigned I = 0; I < BlobCount; ++I) {
Threads.async(Consumer, I, &Read1);
Threads.async(Consumer, I, &Read2);
Threads.async(Producer, I, &Write1); Threads.async(Producer, I, &Write1);
Threads.async(Producer, I, &Write2); Threads.async(Producer, I, &Write2);
Threads.async(Consumer, I, &Read1);
Threads.async(Consumer, I, &Read2);
} }
Threads.wait(); Threads.wait();