Closed llimllib closed 1 year ago
They pass on github, I suppose this is probably something with a difference in process handling on mac?
I think that's right - I mostly develop Pushup on Linux and haven't had any issues running tests, but occasionally see tests fail on my Mac even though they are passing on Linux. It seems like a signal handling difference between the OSes.
Sometimes it hangs entirely rather than failing tests:
It's supposed to time-out (via a context cancellation) after a few seconds if it hangs but it's not - I think I know why. Sorry, TestPushup is kind of a mess :^)
@llimllib curious if this is still the case on your Mac.
The tests just hang without any output, unless I'm just not waiting long enough?
$ make test
go test -v . ./_runtime
^Cmake: *** [test] Error 1
On my MBP running Ventura 13.1, it takes about 10 seconds. (Most of the time, ~9 seconds, is the end-to-end test TestPushup
that creates a server and makes a request for each subtest). It probably looks like nothing is happening because the output is buffered for some reason.
$ make test
go test -v . ./_runtime
=== RUN TestPushup
=== RUN TestPushup/$name.up
=== RUN TestPushup/$name.up/0.conf
=== RUN TestPushup/$name.up/#00
=== RUN TestPushup/attributes.up
=== RUN TestPushup/attributes.up/#00
=== RUN TestPushup/empty.up
=== RUN TestPushup/empty.up/#00
=== RUN TestPushup/escape.up
=== RUN TestPushup/escape.up/#00
=== RUN TestPushup/handler.up
=== RUN TestPushup/handler.up/#00
=== RUN TestPushup/if.up
=== RUN TestPushup/if.up/0.conf
=== RUN TestPushup/if.up/1.conf
=== RUN TestPushup/if.up/2.conf
=== RUN TestPushup/if.up/#00
=== RUN TestPushup/index.up
=== RUN TestPushup/index.up/#00
=== RUN TestPushup/panicking.up
main_test.go:55:
=== RUN TestPushup/partial.up
=== RUN TestPushup/partial.up/0.conf
=== RUN TestPushup/partial.up/1.conf
=== RUN TestPushup/partial.up/#00
=== RUN TestPushup/request_basic.up
=== RUN TestPushup/request_basic.up/#00
=== RUN TestPushup/textelement.up
=== RUN TestPushup/textelement.up/#00
--- PASS: TestPushup (9.09s)
--- PASS: TestPushup/$name.up (1.23s)
--- PASS: TestPushup/$name.up/0.conf (0.66s)
--- PASS: TestPushup/$name.up/#00 (0.57s)
--- PASS: TestPushup/attributes.up (0.54s)
--- PASS: TestPushup/attributes.up/#00 (0.54s)
--- PASS: TestPushup/empty.up (0.52s)
--- PASS: TestPushup/empty.up/#00 (0.52s)
--- PASS: TestPushup/escape.up (0.52s)
--- PASS: TestPushup/escape.up/#00 (0.52s)
--- PASS: TestPushup/handler.up (0.52s)
--- PASS: TestPushup/handler.up/#00 (0.52s)
--- PASS: TestPushup/if.up (2.08s)
--- PASS: TestPushup/if.up/0.conf (0.53s)
--- PASS: TestPushup/if.up/1.conf (0.52s)
--- PASS: TestPushup/if.up/2.conf (0.52s)
--- PASS: TestPushup/if.up/#00 (0.51s)
--- PASS: TestPushup/index.up (0.51s)
--- PASS: TestPushup/index.up/#00 (0.51s)
--- SKIP: TestPushup/panicking.up (0.00s)
--- PASS: TestPushup/partial.up (1.52s)
--- PASS: TestPushup/partial.up/0.conf (0.51s)
--- PASS: TestPushup/partial.up/1.conf (0.50s)
--- PASS: TestPushup/partial.up/#00 (0.50s)
--- PASS: TestPushup/request_basic.up (0.50s)
--- PASS: TestPushup/request_basic.up/#00 (0.50s)
--- PASS: TestPushup/textelement.up (0.51s)
--- PASS: TestPushup/textelement.up/#00 (0.51s)
=== RUN TestTagString
=== RUN TestTagString/#00
=== RUN TestTagString/#01
--- PASS: TestTagString (0.00s)
--- PASS: TestTagString/#00 (0.00s)
--- PASS: TestTagString/#01 (0.00s)
=== RUN TestRouteForPage
=== RUN TestRouteForPage/#00
=== RUN TestRouteForPage/#01
=== RUN TestRouteForPage/#02
=== RUN TestRouteForPage/#03
=== RUN TestRouteForPage/#04
=== RUN TestRouteForPage/#05
=== RUN TestRouteForPage/#06
--- PASS: TestRouteForPage (0.00s)
--- PASS: TestRouteForPage/#00 (0.00s)
--- PASS: TestRouteForPage/#01 (0.00s)
--- PASS: TestRouteForPage/#02 (0.00s)
--- PASS: TestRouteForPage/#03 (0.00s)
--- PASS: TestRouteForPage/#04 (0.00s)
--- PASS: TestRouteForPage/#05 (0.00s)
--- PASS: TestRouteForPage/#06 (0.00s)
=== RUN TestCompiledOutputPath
=== RUN TestCompiledOutputPath/#00
=== RUN TestCompiledOutputPath/#01
=== RUN TestCompiledOutputPath/#02
=== RUN TestCompiledOutputPath/#03
=== RUN TestCompiledOutputPath/#04
=== RUN TestCompiledOutputPath/#05
--- PASS: TestCompiledOutputPath (0.00s)
--- PASS: TestCompiledOutputPath/#00 (0.00s)
--- PASS: TestCompiledOutputPath/#01 (0.00s)
--- PASS: TestCompiledOutputPath/#02 (0.00s)
--- PASS: TestCompiledOutputPath/#03 (0.00s)
--- PASS: TestCompiledOutputPath/#04 (0.00s)
--- PASS: TestCompiledOutputPath/#05 (0.00s)
=== RUN TestTypenameFromPath
=== RUN TestTypenameFromPath/#00
=== RUN TestTypenameFromPath/#01
=== RUN TestTypenameFromPath/#02
=== RUN TestTypenameFromPath/#03
--- PASS: TestTypenameFromPath (0.00s)
--- PASS: TestTypenameFromPath/#00 (0.00s)
--- PASS: TestTypenameFromPath/#01 (0.00s)
--- PASS: TestTypenameFromPath/#02 (0.00s)
--- PASS: TestTypenameFromPath/#03 (0.00s)
=== RUN TestGeneratedTypename
=== RUN TestGeneratedTypename/index.up
=== RUN TestGeneratedTypename/foo-bar.up
=== RUN TestGeneratedTypename/foo_bar.up
=== RUN TestGeneratedTypename/a/b/c.up
=== RUN TestGeneratedTypename/a/b/$c.up
--- PASS: TestGeneratedTypename (0.00s)
--- PASS: TestGeneratedTypename/index.up (0.00s)
--- PASS: TestGeneratedTypename/foo-bar.up (0.00s)
--- PASS: TestGeneratedTypename/foo_bar.up (0.00s)
--- PASS: TestGeneratedTypename/a/b/c.up (0.00s)
--- PASS: TestGeneratedTypename/a/b/$c.up (0.00s)
=== RUN TestOpenTagLexer
=== RUN TestOpenTagLexer/#00
=== RUN TestOpenTagLexer/#01
=== RUN TestOpenTagLexer/#02
=== RUN TestOpenTagLexer/#03
--- PASS: TestOpenTagLexer (0.00s)
--- PASS: TestOpenTagLexer/#00 (0.00s)
--- PASS: TestOpenTagLexer/#01 (0.00s)
--- PASS: TestOpenTagLexer/#02 (0.00s)
--- PASS: TestOpenTagLexer/#03 (0.00s)
=== RUN TestParse
=== RUN TestParse/#00
=== RUN TestParse/#01
=== RUN TestParse/#02
=== RUN TestParse/#03
=== RUN TestParse/#04
=== RUN TestParse/#05
=== RUN TestParse/#06
=== RUN TestParse/#07
=== RUN TestParse/#08
=== RUN TestParse/#09
=== RUN TestParse/#10
=== RUN TestParse/#11
=== RUN TestParse/#12
=== RUN TestParse/#13
=== RUN TestParse/#14
=== RUN TestParse/#15
=== RUN TestParse/#16
=== RUN TestParse/#17
=== RUN TestParse/#18
--- PASS: TestParse (0.00s)
--- PASS: TestParse/#00 (0.00s)
--- PASS: TestParse/#01 (0.00s)
--- PASS: TestParse/#02 (0.00s)
--- PASS: TestParse/#03 (0.00s)
--- PASS: TestParse/#04 (0.00s)
--- PASS: TestParse/#05 (0.00s)
--- PASS: TestParse/#06 (0.00s)
--- PASS: TestParse/#07 (0.00s)
--- PASS: TestParse/#08 (0.00s)
--- PASS: TestParse/#09 (0.00s)
--- PASS: TestParse/#10 (0.00s)
--- PASS: TestParse/#11 (0.00s)
--- PASS: TestParse/#12 (0.00s)
--- PASS: TestParse/#13 (0.00s)
--- PASS: TestParse/#14 (0.00s)
--- PASS: TestParse/#15 (0.00s)
--- PASS: TestParse/#16 (0.00s)
--- PASS: TestParse/#17 (0.00s)
--- PASS: TestParse/#18 (0.00s)
=== RUN TestParseSyntaxErrors
=== RUN TestParseSyntaxErrors/#00
--- PASS: TestParseSyntaxErrors (0.00s)
--- PASS: TestParseSyntaxErrors/#00 (0.00s)
=== RUN TestCodeGenFromNode
=== RUN TestCodeGenFromNode/#00
--- PASS: TestCodeGenFromNode (0.00s)
--- PASS: TestCodeGenFromNode/#00 (0.00s)
=== RUN FuzzParser
=== RUN FuzzParser/seed#0
=== RUN FuzzParser/seed#1
=== RUN FuzzParser/seed#2
=== RUN FuzzParser/seed#3
=== RUN FuzzParser/seed#4
=== RUN FuzzParser/seed#5
=== RUN FuzzParser/0445aab268ee0594f35a506f7e916246b490ea5406771167997039f945a7519c
=== RUN FuzzParser/0cb5ce99807b0b02f40a9f819ba32d6d2d6ead57e9ad1f6f200474e120dcc74f
=== RUN FuzzParser/15ef42c7c86df2c448db0a4102db81ba96b594c738b2b9ece479538097d964e4
=== RUN FuzzParser/284e6117dac7aad1744602852717132781766498e81209fc7f88a4585dfd91da
=== RUN FuzzParser/2eb94d11fd3a308ec2e1fc3221ed85d0b78055f08259683aed9587ec1b3db38b
=== RUN FuzzParser/32f414b3b248393d2975fbff88f954359a7611545123b563f466e08128ce8ef8
=== RUN FuzzParser/340bfff3598515c32773d6408e994346898bd1d1e19ea81bbc49a1310986ec4b
=== RUN FuzzParser/45fe14137e8fc00ada5b93e2e4d5d27ed7d5959b86dcb2847df8066e29467564
=== RUN FuzzParser/566183b68b5d07008b56bd6c844380f04c17af56d9a98d83949e7d6ad4937da5
=== RUN FuzzParser/5f4ed60542551be491ff52a5319fb025d81642b05b25e7c6c3b50de7a6426d62
=== RUN FuzzParser/61ef75ff0c8aa6a5a173ff38f0dd2cfbf135bf3c138ae38f1be5aa00069b7071
=== RUN FuzzParser/628d1689f7a5975633b0775578c4b09c0f78b7d8252e94470d9695931119f289
=== RUN FuzzParser/6b3a6c772259c0ff09c1254c2035bb3490d0d68f48300c5156afe646a637589c
=== RUN FuzzParser/7529c16f529571fc84c2074f3992f3960b85edfb242c2bed80960f2a0f62c4e9
=== RUN FuzzParser/75cf19a9f3869ce51a1b653f6215e9c488a1f2f6d540423f73005b8b481cc294
=== RUN FuzzParser/7d979602e82e69267c68e1e36f08d2c80c4f4b0641d517ba665f61e62b365bf8
=== RUN FuzzParser/87a03eccb9d5bd7dcc80600ddacd5051f6654ef32e3feeb6f1be582206996b9d
=== RUN FuzzParser/9222ff63a4197e2a65f33b8b4f98de4a5b0fd9adf9aca962ceb81c6c95f2437c
=== RUN FuzzParser/b05db8deb3d7cb1891aea331ebd930868a7ac3876a44f36f087dcf51d9779d56
=== RUN FuzzParser/bd3ff7155a899b1775542a57cdf802b86544deb1ff5a710b96d009d9f863ae6e
=== RUN FuzzParser/bde3066429bf973b26344c0c4228e87566ee28df1ac08593553547c9b083b5f1
=== RUN FuzzParser/c138ed54c19e2197e688d2c02d2b7475c3c5bbe45c25eb128a61173a0b7c516e
=== RUN FuzzParser/c2d6da081c53906bbb15ca60d7578f3a432e21ab115b482c52308e3510aa991f
=== RUN FuzzParser/c73563ba4283c1cf042b693a4eec5fe35e1cd2df27b658f2f525e79a5590aa2e
=== RUN FuzzParser/cb88c3e924b2b593307c812b330823a9c9e8243f3ca65695223f3bf96a381f93
=== RUN FuzzParser/cfe4412408c66871dfc9f3b5baa4ec8cba23adc9be0c101d3a755aa45cc65c04
=== RUN FuzzParser/d6b9a2fe32296362e2371abce9c918bf6120c7cca0b264deaaeafefe7c076e2e
=== RUN FuzzParser/fb5ac524d1dff0fca92242a179b9233a97fbd116db183f6f360c4affe7b4443c
--- PASS: FuzzParser (0.01s)
--- PASS: FuzzParser/seed#0 (0.00s)
--- PASS: FuzzParser/seed#1 (0.00s)
--- PASS: FuzzParser/seed#2 (0.00s)
--- PASS: FuzzParser/seed#3 (0.00s)
--- PASS: FuzzParser/seed#4 (0.00s)
--- PASS: FuzzParser/seed#5 (0.00s)
--- PASS: FuzzParser/0445aab268ee0594f35a506f7e916246b490ea5406771167997039f945a7519c (0.00s)
--- PASS: FuzzParser/0cb5ce99807b0b02f40a9f819ba32d6d2d6ead57e9ad1f6f200474e120dcc74f (0.00s)
--- PASS: FuzzParser/15ef42c7c86df2c448db0a4102db81ba96b594c738b2b9ece479538097d964e4 (0.00s)
--- PASS: FuzzParser/284e6117dac7aad1744602852717132781766498e81209fc7f88a4585dfd91da (0.00s)
--- PASS: FuzzParser/2eb94d11fd3a308ec2e1fc3221ed85d0b78055f08259683aed9587ec1b3db38b (0.00s)
--- PASS: FuzzParser/32f414b3b248393d2975fbff88f954359a7611545123b563f466e08128ce8ef8 (0.00s)
--- PASS: FuzzParser/340bfff3598515c32773d6408e994346898bd1d1e19ea81bbc49a1310986ec4b (0.00s)
--- PASS: FuzzParser/45fe14137e8fc00ada5b93e2e4d5d27ed7d5959b86dcb2847df8066e29467564 (0.00s)
--- PASS: FuzzParser/566183b68b5d07008b56bd6c844380f04c17af56d9a98d83949e7d6ad4937da5 (0.00s)
--- PASS: FuzzParser/5f4ed60542551be491ff52a5319fb025d81642b05b25e7c6c3b50de7a6426d62 (0.00s)
--- PASS: FuzzParser/61ef75ff0c8aa6a5a173ff38f0dd2cfbf135bf3c138ae38f1be5aa00069b7071 (0.00s)
--- PASS: FuzzParser/628d1689f7a5975633b0775578c4b09c0f78b7d8252e94470d9695931119f289 (0.00s)
--- PASS: FuzzParser/6b3a6c772259c0ff09c1254c2035bb3490d0d68f48300c5156afe646a637589c (0.00s)
--- PASS: FuzzParser/7529c16f529571fc84c2074f3992f3960b85edfb242c2bed80960f2a0f62c4e9 (0.00s)
--- PASS: FuzzParser/75cf19a9f3869ce51a1b653f6215e9c488a1f2f6d540423f73005b8b481cc294 (0.00s)
--- PASS: FuzzParser/7d979602e82e69267c68e1e36f08d2c80c4f4b0641d517ba665f61e62b365bf8 (0.00s)
--- PASS: FuzzParser/87a03eccb9d5bd7dcc80600ddacd5051f6654ef32e3feeb6f1be582206996b9d (0.00s)
--- PASS: FuzzParser/9222ff63a4197e2a65f33b8b4f98de4a5b0fd9adf9aca962ceb81c6c95f2437c (0.00s)
--- PASS: FuzzParser/b05db8deb3d7cb1891aea331ebd930868a7ac3876a44f36f087dcf51d9779d56 (0.00s)
--- PASS: FuzzParser/bd3ff7155a899b1775542a57cdf802b86544deb1ff5a710b96d009d9f863ae6e (0.00s)
--- PASS: FuzzParser/bde3066429bf973b26344c0c4228e87566ee28df1ac08593553547c9b083b5f1 (0.00s)
--- PASS: FuzzParser/c138ed54c19e2197e688d2c02d2b7475c3c5bbe45c25eb128a61173a0b7c516e (0.00s)
--- PASS: FuzzParser/c2d6da081c53906bbb15ca60d7578f3a432e21ab115b482c52308e3510aa991f (0.00s)
--- PASS: FuzzParser/c73563ba4283c1cf042b693a4eec5fe35e1cd2df27b658f2f525e79a5590aa2e (0.00s)
--- PASS: FuzzParser/cb88c3e924b2b593307c812b330823a9c9e8243f3ca65695223f3bf96a381f93 (0.00s)
--- PASS: FuzzParser/cfe4412408c66871dfc9f3b5baa4ec8cba23adc9be0c101d3a755aa45cc65c04 (0.00s)
--- PASS: FuzzParser/d6b9a2fe32296362e2371abce9c918bf6120c7cca0b264deaaeafefe7c076e2e (0.00s)
--- PASS: FuzzParser/fb5ac524d1dff0fca92242a179b9233a97fbd116db183f6f360c4affe7b4443c (0.00s)
=== RUN FuzzOpenTagLexer
=== RUN FuzzOpenTagLexer/seed#0
=== RUN FuzzOpenTagLexer/seed#1
=== RUN FuzzOpenTagLexer/seed#2
=== RUN FuzzOpenTagLexer/0b41feaff7c5ee21c2a31efd9f3abcbdba9d78153dfc3fbc85751370e38fa200
=== RUN FuzzOpenTagLexer/c68ade32a97f7753777d7ba14a0922e07c1ccaedddcae076923d9c55ea0d0de7
=== RUN FuzzOpenTagLexer/df2e9afc502a9f8a4ab7d6ed030192554c99bb11fcbbe08bedda0bd77243e2ac
--- PASS: FuzzOpenTagLexer (0.00s)
--- PASS: FuzzOpenTagLexer/seed#0 (0.00s)
--- PASS: FuzzOpenTagLexer/seed#1 (0.00s)
--- PASS: FuzzOpenTagLexer/seed#2 (0.00s)
--- PASS: FuzzOpenTagLexer/0b41feaff7c5ee21c2a31efd9f3abcbdba9d78153dfc3fbc85751370e38fa200 (0.00s)
--- PASS: FuzzOpenTagLexer/c68ade32a97f7753777d7ba14a0922e07c1ccaedddcae076923d9c55ea0d0de7 (0.00s)
--- PASS: FuzzOpenTagLexer/df2e9afc502a9f8a4ab7d6ed030192554c99bb11fcbbe08bedda0bd77243e2ac (0.00s)
PASS
ok github.com/adhocteam/pushup 9.346s
=== RUN TestRegexPatFromRoute
=== RUN TestRegexPatFromRoute/#00
=== RUN TestRegexPatFromRoute/#01
=== RUN TestRegexPatFromRoute/#02
=== RUN TestRegexPatFromRoute/#03
=== RUN TestRegexPatFromRoute/#04
=== RUN TestRegexPatFromRoute/#05
=== RUN TestRegexPatFromRoute/#06
--- PASS: TestRegexPatFromRoute (0.00s)
--- PASS: TestRegexPatFromRoute/#00 (0.00s)
--- PASS: TestRegexPatFromRoute/#01 (0.00s)
--- PASS: TestRegexPatFromRoute/#02 (0.00s)
--- PASS: TestRegexPatFromRoute/#03 (0.00s)
--- PASS: TestRegexPatFromRoute/#04 (0.00s)
--- PASS: TestRegexPatFromRoute/#05 (0.00s)
--- PASS: TestRegexPatFromRoute/#06 (0.00s)
=== RUN TestMostSpecificMatch
=== RUN TestMostSpecificMatch/#00
=== RUN TestMostSpecificMatch/#01
=== RUN TestMostSpecificMatch/#02
--- PASS: TestMostSpecificMatch (0.00s)
--- PASS: TestMostSpecificMatch/#00 (0.00s)
--- PASS: TestMostSpecificMatch/#01 (0.00s)
--- PASS: TestMostSpecificMatch/#02 (0.00s)
=== RUN TestIsPartialRoute
=== RUN TestIsPartialRoute/#00
=== RUN TestIsPartialRoute/#01
=== RUN TestIsPartialRoute/#02
=== RUN TestIsPartialRoute/#03
--- PASS: TestIsPartialRoute (0.00s)
--- PASS: TestIsPartialRoute/#00 (0.00s)
--- PASS: TestIsPartialRoute/#01 (0.00s)
--- PASS: TestIsPartialRoute/#02 (0.00s)
--- PASS: TestIsPartialRoute/#03 (0.00s)
=== RUN TestDisplayPartialHere
=== RUN TestDisplayPartialHere/#00
=== RUN TestDisplayPartialHere/#01
=== RUN TestDisplayPartialHere/#02
=== RUN TestDisplayPartialHere/#03
=== RUN TestDisplayPartialHere/#04
=== RUN TestDisplayPartialHere/#05
=== RUN TestDisplayPartialHere/#06
=== RUN TestDisplayPartialHere/#07
=== RUN TestDisplayPartialHere/#08
=== RUN TestDisplayPartialHere/#09
=== RUN TestDisplayPartialHere/#10
=== RUN TestDisplayPartialHere/#11
=== RUN TestDisplayPartialHere/#12
--- PASS: TestDisplayPartialHere (0.00s)
--- PASS: TestDisplayPartialHere/#00 (0.00s)
--- PASS: TestDisplayPartialHere/#01 (0.00s)
--- PASS: TestDisplayPartialHere/#02 (0.00s)
--- PASS: TestDisplayPartialHere/#03 (0.00s)
--- PASS: TestDisplayPartialHere/#04 (0.00s)
--- PASS: TestDisplayPartialHere/#05 (0.00s)
--- PASS: TestDisplayPartialHere/#06 (0.00s)
--- PASS: TestDisplayPartialHere/#07 (0.00s)
--- PASS: TestDisplayPartialHere/#08 (0.00s)
--- PASS: TestDisplayPartialHere/#09 (0.00s)
--- PASS: TestDisplayPartialHere/#10 (0.00s)
--- PASS: TestDisplayPartialHere/#11 (0.00s)
--- PASS: TestDisplayPartialHere/#12 (0.00s)
=== RUN TestMatchURLPathSegmentPrefix
=== RUN TestMatchURLPathSegmentPrefix/#00
=== RUN TestMatchURLPathSegmentPrefix/#01
=== RUN TestMatchURLPathSegmentPrefix/#02
=== RUN TestMatchURLPathSegmentPrefix/#03
=== RUN TestMatchURLPathSegmentPrefix/#04
=== RUN TestMatchURLPathSegmentPrefix/#05
=== RUN TestMatchURLPathSegmentPrefix/#06
=== RUN TestMatchURLPathSegmentPrefix/#07
=== RUN TestMatchURLPathSegmentPrefix/#08
--- PASS: TestMatchURLPathSegmentPrefix (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#00 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#01 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#02 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#03 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#04 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#05 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#06 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#07 (0.00s)
--- PASS: TestMatchURLPathSegmentPrefix/#08 (0.00s)
PASS
ok github.com/adhocteam/pushup/_runtime 0.189s
I just let it run out, there's a 10 minute timeout on it:
I do seem to get occasional successes, but as long as I use go test -count=1 . ./_runtime
to avoid getting cached results, I mostly get hangs.
replicated the issue on my other macbook. I'm going to try to use this lib and see if I can get any useful info out of it
no luck with that
Just curious, if you run?
go test -v .
Should output each test without buffering.
hangs after:
$ go test -count=1 -v .
=== RUN TestPushup
=== RUN TestPushup/$name.up
=== RUN TestPushup/$name.up/0.conf
=== RUN TestPushup/$name.up/#00
=== RUN TestPushup/attributes.up
=== RUN TestPushup/attributes.up/#00
=== RUN TestPushup/empty.up
=== RUN TestPushup/empty.up/#00
=== RUN TestPushup/escape.up
=== RUN TestPushup/escape.up/#00
=== RUN TestPushup/handler.up
=== RUN TestPushup/handler.up/#00
=== RUN TestPushup/if.up
=== RUN TestPushup/if.up/0.conf
just like in the full buffered output
I've started instrumenting the function, and it seems that which particular request it hangs on is random
I'm pretty sure it's this line where the process ultimately hangs: https://github.com/adhocteam/pushup/blob/main/main_test.go#L182 , but I suppose that's not extremely exciting news
I pushed my instrumentation code to the instrument-test-failure branch. When a test succeeds, you'll see something like:
main_test.go:166: /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/TestPushup3617381832/001/pushup.exe run -build-pkg github.com/adhocteam/pushup/build -page testdata/attributes.up -unix-socket /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/pushup282877214/sock
main_test.go:195: launching read output
main_test.go:229: waiting to kill
main_test.go:247: making request
main_test.go:288: waiting
main_test.go:297: checking error
main_test.go:185: waiting for build process to finish, 60590
main_test.go:213: read output, needle found
main_test.go:284: request completed
main_test.go:233: done, killing -60590
main_test.go:238: killed
main_test.go:191: pushup process done
main_test.go:291: wait completed
main_test.go:294: closes completed
When it fails, you get something like:
=== RUN TestPushup/empty.up/#00
main_test.go:166: /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/TestPushup3617381832/001/pushup.exe run -build-pkg github.com/adhocteam/pushup/build -page testdata/empty.up -unix-socket /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/pushup4194445339/sock
main_test.go:195: launching read output
main_test.go:229: waiting to kill
main_test.go:247: making request
main_test.go:288: waiting
main_test.go:297: checking error
main_test.go:185: waiting for build process to finish, 60614
main_test.go:213: read output, needle found
main_test.go:284: request completed
main_test.go:233: done, killing -60614
main_test.go:238: killed
You can see that the pushup process done
log - which fires right after the cmd.Wait
for the pushup run
process - never happen.
So it seems like Wait
isn't returning, despite the fact that process 60614 is dead, and the process just sits there for 10 minutes until the timeout finally throws.
$ ps aux | grep 6061
llimllib 63105 0.0 0.0 408626880 1312 s009 S+ 3:11PM 0:00.00 grep 6061
@llimllib Can you double-check that you pushed your changed to instrument-test-failure? If I look at https://github.com/adhocteam/pushup/commits/instrument-test-failure I don't see any new commits. I might be doing something wrong.
doh, I failed at git... one sec
ok, pushed a redo of that code, with slightly better output now:
$ go test -count=1 -v .
=== RUN TestPushup
=== RUN TestPushup/$name.up
=== RUN TestPushup/$name.up/0.conf
main_test.go:166: /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/TestPushup1917556785/001/pushup.exe run -build-pkg github.com/adhocteam/pushup/build -page testdata/$name.up -unix-socket /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/pushup4028056865/sock
main_test.go:285: closer: waiting
main_test.go:179: pushup: launching
main_test.go:184: pushup: waiting, pid 51513
main_test.go:209: ready listener: needle found
main_test.go:263: test runner: making request
main_test.go:273: test runner: sending done
main_test.go:229: process killer: recvd done -51513
main_test.go:280: test runner: complete
main_test.go:233: process killer: killed -51513
main_test.go:189: pushup: process done
main_test.go:287: closer: wait complete
=== RUN TestPushup/$name.up/#00
main_test.go:166: /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/TestPushup1917556785/001/pushup.exe run -build-pkg github.com/adhocteam/pushup/build -page testdata/$name.up -unix-socket /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/pushup1160732222/sock
main_test.go:285: closer: waiting
main_test.go:179: pushup: launching
main_test.go:184: pushup: waiting, pid 51537
main_test.go:209: ready listener: needle found
main_test.go:263: test runner: making request
main_test.go:273: test runner: sending done
main_test.go:280: test runner: complete
main_test.go:229: process killer: recvd done -51537
main_test.go:233: process killer: killed -51537
<process hangs here, with the "pushup" process hung on `Wait()`>
Interestingly, I just got a test run where the test hung on the cmd.Wait
in the process killer goroutine, instead of the pushup goroutine:
=== RUN TestPushup/$name.up/#00
main_test.go:166: /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/TestPushup3674165444/001/pushup.exe run -build-pkg github.com/adhocteam/pushup/build -page testdata/$name.up -unix-socket /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/pushup1529436637/sock
main_test.go:285: closer: waiting
main_test.go:179: pushup: launching
main_test.go:184: pushup: waiting, pid 52688
main_test.go:209: ready listener: needle found
main_test.go:263: test runner: making request
main_test.go:273: test runner: sending done
main_test.go:280: test runner: complete
main_test.go:229: process killer: recvd done -52688
main_test.go:189: pushup: process done
pushup wasn't checking the error on the Wait
inside the process killer goroutine, I added a handler for it and got an error:
=== RUN TestPushup/if.up/2.conf
main_test.go:166: /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/TestPushup943142027/001/pushup.exe run -build-pkg github.com/adhocteam/pushup/build -page testdata/if.up -unix-socket /var/folders/cj/3fpctnd52vv37y9gpdgg7c200000gn/T/pushup1722349862/sock
main_test.go:288: closer: waiting
main_test.go:179: pushup: launching
main_test.go:184: pushup: waiting, pid 56902
main_test.go:210: ready listener: needle found
main_test.go:266: test runner: making request
main_test.go:276: test runner: sending done
main_test.go:283: test runner: complete
main_test.go:230: process killer: recvd done -56902
main_test.go:234: process killer: wait caught an error wait: no child processes
main_test.go:236: process killer: killed -56902
Removing cmd.Wait
from the process killer goroutine seems to solve the issue, PR incoming
I started to look into it, but the
TestPushup
function is pretty hard to understand