Skip to content

Commit b4090c2

Browse files
authored
Ensure final EOF in LLProcess test (#4877)
1 parent 0d5138c commit b4090c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

indra/llcommon/tests/llprocess_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ void waitfor(LLProcess& proc, int timeout=60)
126126
{
127127
yield();
128128
}
129+
// Pump once more after the process exits to flush any final events such as EOF.
130+
yield(0);
129131
std::string msg = "process took longer than " + std::to_string(timeout) + " seconds to terminate";
130132
tut::ensure(msg, i < timeout);
131133
}
@@ -137,6 +139,8 @@ void waitfor(LLProcess::handle h, const std::string& desc, int timeout=60)
137139
{
138140
yield();
139141
}
142+
// Pump once more after the process exits to flush any final events such as EOF.
143+
yield(0);
140144
std::string msg = "process took longer than " + std::to_string(timeout) + " seconds to terminate";
141145
tut::ensure(msg, i < timeout);
142146
}

0 commit comments

Comments
 (0)