Skip to content

Commit

Permalink
fix: fixed linter errors in dsl/pact
Browse files Browse the repository at this point in the history
  • Loading branch information
antklim committed Jul 30, 2021
1 parent 5a5ef03 commit 01b8e81
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dsl/pact.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,12 @@ func (p *Pact) VerifyMessageProviderRaw(request VerifyMessageRequest) ([]types.P
defer ln.Close()

log.Printf("[DEBUG] API handler starting: port %d (%s)", port, ln.Addr())
go http.Serve(ln, mux)
go func() {
if err := http.Serve(ln, mux); err != nil {
// NOTE: calling Fatalf causing test failures due to "accept tcp [::]:<port>: use of closed network connection"
log.Printf("[ERROR] API handler start failed: %v", err)
}
}()

portErr := waitForPort(port, "tcp", "localhost", p.ClientTimeout,
fmt.Sprintf(`Timed out waiting for pact proxy on port %d - check for errors`, port))
Expand All @@ -721,7 +726,7 @@ func (p *Pact) VerifyMessageProviderRaw(request VerifyMessageRequest) ([]types.P
// It is the receiver of an interaction, and needs to be able to handle whatever
// request was provided.
func (p *Pact) VerifyMessageConsumerRaw(message *Message, handler MessageConsumer) error {
log.Printf("[DEBUG] verify message")
log.Println("[DEBUG] verify message")
p.Setup(false)

// Reify the message back to its "example/generated" form
Expand Down

0 comments on commit 01b8e81

Please sign in to comment.