Skip to content

Commit

Permalink
Fix nasa#1650, Add delay loop to wait until background job ends
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey authored and pavll committed Aug 1, 2021
1 parent 75f508d commit 74556d2
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 74556d2

Please sign in to comment.