system/dbus: create context in subtest
Some checks failed
Test / Create distribution (push) Successful in 25s
Test / Hakurei (push) Successful in 42s
Test / Sandbox (push) Successful in 41s
Test / Hakurei (race detector) (push) Successful in 43s
Test / Sandbox (race detector) (push) Successful in 40s
Test / Hpkg (push) Successful in 41s
Test / Flake checks (push) Has been cancelled
Some checks failed
Test / Create distribution (push) Successful in 25s
Test / Hakurei (push) Successful in 42s
Test / Sandbox (push) Successful in 41s
Test / Hakurei (race detector) (push) Successful in 43s
Test / Sandbox (race detector) (push) Successful in 40s
Test / Hpkg (push) Successful in 41s
Test / Flake checks (push) Has been cancelled
This is causing a huge amount of spurious test failures due to the poor performance of the integration vm. This should finally put an end to the annoyance. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
ea10c4d5a5
commit
210d36242e
@ -63,6 +63,10 @@ func TestProxyStartWaitCloseString(t *testing.T) {
|
|||||||
t.Run("direct", func(t *testing.T) { testProxyFinaliseStartWaitCloseString(t, false) })
|
t.Run("direct", func(t *testing.T) { testProxyFinaliseStartWaitCloseString(t, false) })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
stubProxyTimeout = 30 * time.Second
|
||||||
|
)
|
||||||
|
|
||||||
func testProxyFinaliseStartWaitCloseString(t *testing.T, useSandbox bool) {
|
func testProxyFinaliseStartWaitCloseString(t *testing.T, useSandbox bool) {
|
||||||
{
|
{
|
||||||
oldWaitDelay := helper.WaitDelay
|
oldWaitDelay := helper.WaitDelay
|
||||||
@ -118,7 +122,8 @@ func testProxyFinaliseStartWaitCloseString(t *testing.T, useSandbox bool) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(t.Context(), 5*time.Second)
|
t.Run("run", func(t *testing.T) {
|
||||||
|
ctx, cancel := context.WithTimeout(t.Context(), stubProxyTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
output := new(strings.Builder)
|
output := new(strings.Builder)
|
||||||
if !useSandbox {
|
if !useSandbox {
|
||||||
@ -144,7 +149,6 @@ func testProxyFinaliseStartWaitCloseString(t *testing.T, useSandbox bool) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("start", func(t *testing.T) {
|
|
||||||
if err := p.Start(); err != nil {
|
if err := p.Start(); err != nil {
|
||||||
t.Fatalf("Start: error = %v",
|
t.Fatalf("Start: error = %v",
|
||||||
err)
|
err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user