Skip to content

Commit

Permalink
Fix time error, add timeout for future
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Nov 30, 2023
1 parent 87ac2f3 commit 099f1a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions servicetests/test_cases/test_jobs_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import run_in_ci
import ci_iot_thing

import time


def main():
argument_parser = argparse.ArgumentParser(
Expand Down
5 changes: 4 additions & 1 deletion servicetests/tests/JobsExecution/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ void getAvailableJobs(Aws::Crt::String thingName, IotJobsClient &jobsClient)
publishDescribeJobExeCompletedPromise.get_future().wait();

fprintf(stderr, "get available jobs waiting iot core answer\n");
getResponse.get_future().wait();
if (getResponse.get_future().wait_for(std::chrono::seconds(10)) == std::future_status::timeout) {
fprintf(stderr, "get available jobs error timedout\n");
exit (-1);
}
fprintf(stderr, "get available jobs returning\n");
}

0 comments on commit 099f1a8

Please sign in to comment.