We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
WithNewAsyncStep in WithNewAsyncStep will cause deadlock and tests will never finish.
WithNewAsyncStep in step won't be executed async
To Reproduce
package my_suite import ( "github.com/ozontech/allure-go/pkg/framework/provider" ) func (s *Suite) TestSome3(t provider.T) { t.Parallel() t.WithNewStep("sync-step1", func(sCtx provider.StepCtx) { sCtx.WithNewAsyncStep("sync-step1-async-step-1", func(sCtx provider.StepCtx) { sCtx.WithNewAsyncStep("sync-step1-async-step-1-step1", func(sCtx provider.StepCtx) { }) }) }) }
package my_suite import ( "time" "github.com/ozontech/allure-go/pkg/framework/provider" ) func (s *Suite) TestSome3(t provider.T) { t.Parallel() startedAt := time.Now() timeSinceStart := func() int64 { return int64(time.Since(startedAt).Round(time.Second).Seconds()) } sleepDuration := 5 * time.Second t.WithNewStep("sync-step1", func(sCtx provider.StepCtx) { sCtx.Logf("sync-step1. start: %d", timeSinceStart()) time.Sleep(sleepDuration) sCtx.Logf("sync-step1. finish: %d", timeSinceStart()) sCtx.WithNewAsyncStep("sync-step1-async-step-1", func(sCtx provider.StepCtx) { sCtx.Logf("sync-step1-async-step-1. start: %d", timeSinceStart()) time.Sleep(sleepDuration) sCtx.Logf("sync-step1-async-step-1. finish: %d", timeSinceStart()) }) sCtx.WithNewAsyncStep("sync-step1-async-step-2", func(sCtx provider.StepCtx) { sCtx.Logf("sync-step1-async-step-2. start: %d", timeSinceStart()) time.Sleep(sleepDuration) sCtx.Logf("sync-step1-async-step-2. finish: %d", timeSinceStart()) }) }) t.WithNewStep("sync-step2", func(sCtx provider.StepCtx) { sCtx.Logf("sync-step2. start: %d", timeSinceStart()) time.Sleep(sleepDuration) sCtx.Logf("sync-step2. finish: %d", timeSinceStart()) }) }
output
step_context.go:104: sync-step1. finish: 5 step_context.go:104: sync-step1-async-step-1. start: 5 step_context.go:104: sync-step1-async-step-1. finish: 10 step_context.go:104: sync-step1-async-step-2. start: 10 step_context.go:104: sync-step1-async-step-2. finish: 15 step_context.go:104: sync-step2. start: 15 step_context.go:104: sync-step2. finish: 20
Expected behavior
The text was updated successfully, but these errors were encountered:
xpoft
Successfully merging a pull request may close this issue.
Describe the bug
WithNewAsyncStep in WithNewAsyncStep will cause deadlock and tests will never finish.
WithNewAsyncStep in step won't be executed async
To Reproduce
output
Expected behavior
The text was updated successfully, but these errors were encountered: