Skip to content

Commit 30c5c48

Browse files
[CAS][Tests] Fix unit tests that hangs on two cores (#154151)
1 parent 8255d24 commit 30c5c48

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/unittests/CAS/ObjectStoreTest.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ TEST_P(CASTest, NodesBig) {
269269
ASSERT_THAT_ERROR(CAS->validate(CAS->getID(ID)), Succeeded());
270270
}
271271

272-
// FIXME: Re-enable the test.
273-
#if 0
272+
#if LLVM_ENABLE_THREADS
274273
/// Common test functionality for creating blobs in parallel. You can vary which
275274
/// cas instances are the same or different, and the size of the created blobs.
276275
static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2,
@@ -318,10 +317,10 @@ static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2,
318317

319318
DefaultThreadPool Threads;
320319
for (unsigned I = 0; I < BlobCount; ++I) {
321-
Threads.async(Consumer, I, &Read1);
322-
Threads.async(Consumer, I, &Read2);
323320
Threads.async(Producer, I, &Write1);
324321
Threads.async(Producer, I, &Write2);
322+
Threads.async(Consumer, I, &Read1);
323+
Threads.async(Consumer, I, &Read2);
325324
}
326325

327326
Threads.wait();

0 commit comments

Comments
 (0)