Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Abdulsametileri/9cfcb2e8cb44662efbc6432df1ac1ffe to your computer and use it in GitHub Desktop.
Save Abdulsametileri/9cfcb2e8cb44662efbc6432df1ac1ffe to your computer and use it in GitHub Desktop.
func (t *TestContainerWrapper) CleanUp() {
ctx, cancelFunc := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFunc()
if err := t.container.Terminate(ctx); err != nil {
log.Printf("could not terminate container: %s\n", err)
}
}
func (t *TestContainerWrapper) GetBrokerAddresses() []string {
return []string{fmt.Sprintf("localhost:%d", t.hostPort)}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment