Closed cakeinpanic closed 6 years ago
I have found this issue: https://github.com/pact-foundation/pact-js/issues/59
but it doesn't help When I specify
pact: [
{
consumer: 'A',
provider: 'A',
cors: true,
port: 1234,
dir: 'pact/pacts',
spec: 2,
logLevel: 'DEBUG',
log: path.resolve(process.cwd(), 'pact', 'pact.log'),
pactfileWriteMode: true
},
{
consumer: 'B',
provider: 'B',
cors: true,
port: 4567,
dir: 'pact/pacts',
spec: 2,
logLevel: 'DEBUG',
log: path.resolve(process.cwd(), 'pact', 'pact.log'),
pactfileWriteMode: true
}
],
tests fail with Unable to connect to "http://127.0.0.1:1234/interactions"
As usual, on third try everything worked fine
There are really some strange caches hidden somewhere, I'm working with pact for a week and really often need to restart it on my local machine because of something strange. Once I even needed to restart machine because(I guess) some process was not killed and I instantly got error 'interaction with same state is registered already' and all that could help me(except restarting) - adding some random string to state in each interaction((
and really often need to restart it on my local machine because of something strange
The mock service is very stateful (by necessity). It must be restarted at every test run. It is not designed to be a long running process.
If it is not shutting down correctly between test runs, that is an issue that needs to be raised and addressed.
Software versions
Expected behaviour
I create two providers with different provider and consumers
karma config
I expect that there would be two files
A-A.json
andB-B.json
with different contentActual behaviour
I have two files
A-A.json
andB-B.json
with same content – each file includes all interactions