From 87d3cddd585af60bed8f1093aebd9ca8af581638 Mon Sep 17 00:00:00 2001 From: Sai Kiran <85323324+r00tu53r@users.noreply.github.com> Date: Mon, 28 Mar 2022 21:09:51 +1100 Subject: [PATCH] Handle error for 0 doc hits for a data stream (#744) * Fix panic caused when there are no doc hits for a data stream during system tests. --- internal/testrunner/runners/system/runner.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/testrunner/runners/system/runner.go b/internal/testrunner/runners/system/runner.go index d082d4e4a..1ecedeb36 100644 --- a/internal/testrunner/runners/system/runner.go +++ b/internal/testrunner/runners/system/runner.go @@ -434,6 +434,7 @@ func (r *runner) runTest(config *testConfig, ctxt servicedeployer.ServiceContext if !passed { result.FailureMsg = fmt.Sprintf("could not find hits in %s data stream", dataStream) + return result.WithError(fmt.Errorf("%s", result.FailureMsg)) } // Validate fields in docs