pact-foundation/pact-jvm

Pact weird behaviour in the contract if same test is present in two class files for same consumer and provider pair.

Open

#1.893 aberto em 12 de jan. de 2026

Ver no GitHub
 (11 comments) (0 reactions) (0 assignees)Groovy (486 forks)batch import
buggood first issuehelp wantedtriage

Métricas do repositório

Stars
 (1.127 stars)
Métricas de merge de PR
 (Mesclagem média 1d 5h) (2 fundiu PRs em 30d)

Description

I was writing this scenario, where accidently I had written the a test case in two different class with same consumer and provider pair which is having Authorization header in the api request.

So when I publish the contract from one test class, contract was perfectly fine, but when I ran the second test class with exact same test case and publish the contract there was extra space coming in the authorization header.

Not sure why this happen?

Guia do colaborador