DevinLeamy commented on code in PR #463:
URL: https://github.com/apache/mesos/pull/463#discussion_r1454179888
##########
src/tests/containerizer/xfs_quota_tests.cpp:
##########
@@ -101,6 +101,21 @@ static QuotaInfo makeQuotaInfo(
}
+static bool waitForFileCreation(
+ const string& path,
+ const Duration& duration = Seconds(60))
+{
+ Stopwatch timer;
+ timer.start();
+ while (!os::exists(path)) {
+ if ((duration > Duration::zero()) && (timer.elapsed() > duration))
+ break;
+ os::sleep(Milliseconds(50));
+ }
Review Comment:
```cpp
while (!os::exists(path) && timer.elapsed() <= duration) {
os::sleep(Milliseconds(50));
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]