summaryrefslogtreecommitdiff
path: root/tools/slang-unit-test/unit-test-process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-unit-test/unit-test-process.cpp')
-rw-r--r--tools/slang-unit-test/unit-test-process.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/slang-unit-test/unit-test-process.cpp b/tools/slang-unit-test/unit-test-process.cpp
index 8a55b0b29..548ef168f 100644
--- a/tools/slang-unit-test/unit-test-process.cpp
+++ b/tools/slang-unit-test/unit-test-process.cpp
@@ -48,10 +48,17 @@ static SlangResult _httpReflectTest(UnitTestContext* context)
SLANG_RETURN_ON_FAIL(connection->write(buf.getBuffer(), size_t(size)));
// Wait for the response
- SLANG_RETURN_ON_FAIL(connection->waitForContent());
+ SLANG_RETURN_ON_FAIL(connection->waitForResult());
- auto readContent = connection->getContent();
+ // If we don't have content then something has gone wrong
+ if (!connection->hasContent())
+ {
+ finalRes = SLANG_FAIL;
+ break;
+ }
+ // Check the content is the same
+ auto readContent = connection->getContent();
if (readContent != buf.getArrayView())
{
finalRes = SLANG_FAIL;