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.

Offen

#1.893 geöffnet am 12.01.2026

 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Kotlin (489 Forks)batch import
buggood first issuehelp wantedtriage

Repository-Metriken

Stars
 (1.141 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1h 51m) (4 gemergte PRs in 30 T)

Beschreibung

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?

Contributor Guide