Skip to content

Commit

Permalink
Add delay loop to wait until background job ends
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Jul 23, 2021
1 parent 63134bc commit 181a797
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/cfe_testcase/src/fs_util_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,15 @@ void TestFileDump(void)
State.IsPending = true;
UtAssert_INT32_EQ(CFE_FS_BackgroundFileDumpIsPending(&State), true);

/* Wait for background task to complete */
while(CFE_FS_BackgroundFileDumpIsPending(&State))
{
OS_TaskDelay(100);
}

UtAssert_INT32_EQ(CFE_FS_BackgroundFileDumpRequest(NULL), CFE_FS_BAD_ARGUMENT);
UtAssert_INT32_EQ(CFE_FS_BackgroundFileDumpIsPending(NULL), false);

}

void FSUtilTestSetup(void)
Expand Down

0 comments on commit 181a797

Please sign in to comment.