I've seen this happen a number of different ways, but usually the end of test output looks something like
...
--- PASS: TestVariousQueries/7-node/34-G (8.50s)
FAIL
FAIL github.com/pilosa/pilosa/v2 483.327s
FAIL
In our particular case, we have a lot of nested subtests using t.Run, and tests which run in parallel, but in general we've found that it's possible for the test suite to FAIL without an individual test failing.
in my above example, if you search backward for "FAIL" you seem something like:
--- FAIL: TestVariousQueries/7-node (482.60s)
--- PASS: TestVariousQueries/7-node/0-G
...
where it's indicated that the top level test failed, but all the subtests seem to pass and there's no other output or message indicating why the test failed.
Sometimes it will look like this, which gives a bit more of a clue
...
=== RUN TestVariousQueries/7-node/8-Count(All())
FAIL github.com/pilosa/pilosa/v2 394.988s
FAIL
In this case it seems like that last test started, but somehow failed with no output (we would expect to get a --- FAIL
line for that particular test rather than just the package level FAIL.
What scenarios can cause this to happen? How can it be debugged?