这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Lazar955
Copy link
Member

@Lazar955 Lazar955 commented Dec 24, 2024

This PR removes the usage of signal.Interceptor and uses Go's idiomatic context to handle cancellations. This enables us to run e2e tests in parallel (almost 4x faster).

//old-time
ok      github.com/babylonlabs-io/finality-provider/itest       548.976s
// new time
ok      github.com/babylonlabs-io/finality-provider/itest       139.579s

Time in GH action 9m 58s vs 3m 24s

Closes #219

Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Comment on lines 99 to 101
// Wait for shutdown signal from either a graceful server stop or from
// the interrupt handler.
<-s.interceptor.ShutdownChannel()
// <-s.interceptor.ShutdownChannel()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover

Comment on lines 97 to 100
// the interrupt handler.
<-s.interceptor.ShutdownChannel()
// <-s.interceptor.ShutdownChannel()
<-ctx.Done()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover

Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Lazar955 Lazar955 merged commit d7059e0 into main Dec 24, 2024
12 checks passed
@Lazar955 Lazar955 deleted the lazar/use-context branch December 24, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove interceptors, use context for cancellation

4 participants