-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VerifyMessageConsumer failed: error creating message: exit status 255 #348
Comments
I'm no Windows expert, but a cursory google suggests the |
It looks like there was an error executing the pact message cli here
This is the command it is trying to run
If you try an execute both the batch file directly, and then with the full command your test is running, what is the output? |
When executing I get following response, but could not identify the problem of parsing json
|
Software versions
v1.7.0
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=~\AppData\Local\go-build
set GOENV=~\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=~\go\pkg\mod
set GOOS=windows
set GOPATH=~\go
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=~\go\src\spielwiese\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=~\AppData\Local\Temp\go-build537390226=/tmp/go-build -gno-record-gcc-switches
Expected behaviour
Running pact test for async message queue output new pact
Actual behaviour
VerifyMessageConsumer raise error
Steps to reproduce
Create Folder with attached file
run: go.exe test .
Relevent log files
2023/09/30 21:58:22 [DEBUG] pact setup logging
2023/09/30 21:58:22 [DEBUG] pact add message
2023/09/30 21:58:22 [DEBUG] setting Message decoding to type: *types.User
2023/09/30 21:58:22 [DEBUG] verify message
2023/09/30 21:58:22 [DEBUG] pact setup logging
2023/09/30 21:58:22 [DEBUG] pact setup
2023/09/30 21:58:22 [DEBUG] checking CLI compatibility
2023/09/30 21:58:22 [INFO] checking pact-mock-service within range >= 3.5.0, < 4.0.0
2023/09/30 21:58:22 [DEBUG] running binary pact-mock-service
2023/09/30 21:58:23 [DEBUG] checking version for binary pact-mock-service version 3.11.2
2023/09/30 21:58:23 [DEBUG] checking if version 3.11.2 within semver range >= 3.5.0, < 4.0.0
2023/09/30 21:58:23 [DEBUG] 3.11.2 satisfies constraints 3.11.2 >= 3.5.0, < 4.0.0
2023/09/30 21:58:23 [INFO] checking pact-provider-verifier within range >= 1.36.1, < 2.0.0
2023/09/30 21:58:23 [DEBUG] running binary pact-provider-verifier
2023/09/30 21:58:25 [DEBUG] checking version for binary pact-provider-verifier version 1.38.0
2023/09/30 21:58:25 [DEBUG] checking if version 1.38.0 within semver range >= 1.36.1, < 2.0.0
2023/09/30 21:58:25 [DEBUG] 1.38.0 satisfies constraints 1.38.0 >= 1.36.1, < 2.0.0
2023/09/30 21:58:25 [INFO] checking pact-broker within range >= 1.22.3
2023/09/30 21:58:25 [DEBUG] running binary pact-broker
2023/09/30 21:58:26 [DEBUG] checking version for binary pact-broker version 1.72.0
2023/09/30 21:58:26 [DEBUG] checking if version 1.72.0 within semver range >= 1.22.3
2023/09/30 21:58:26 [DEBUG] 1.72.0 satisfies constraints 1.72.0 >= 1.22.3
2023/09/30 21:58:26 [DEBUG] setting up a service manager
2023/09/30 21:58:26 [DEBUG] setting up a service manager
2023/09/30 21:58:26 [DEBUG] starting service creation monitor
2023/09/30 21:58:26 [DEBUG] setting up a service manager
2023/09/30 21:58:26 [DEBUG] starting service creation monitor
2023/09/30 21:58:26 [DEBUG] setting up a service manager
2023/09/30 21:58:26 [DEBUG] starting service removal monitor
2023/09/30 21:58:26 [DEBUG] starting service removal monitor
2023/09/30 21:58:26 [DEBUG] starting service creation monitor
2023/09/30 21:58:26 [DEBUG] starting service creation monitor
2023/09/30 21:58:26 [DEBUG] starting service removal monitor
2023/09/30 21:58:26 [DEBUG] starting service removal monitor
2023/09/30 21:58:26 [DEBUG] client: adding pact message...
2023/09/30 21:58:26 [DEBUG] starting message service with args: [reify {"access":{"json_class":"Pact::ArrayLike","contents":{"role":{"json_class":"Pact::Term","data":{"generate":"admin","matcher":{"json_class":"Regexp","o":0,"s":"admin|user"}}}},"min":3},"id":{"json_class":"Pact::SomethingLike","contents":127},"name":"Baz"}]
2023/09/30 21:58:28 [DEBUG] narrowing type to
2023/09/30 21:58:28 [DEBUG] client: adding pact message...
2023/09/30 21:58:28 [DEBUG] starting message service with args: [update {"contents":{"access":{"json_class":"Pact::ArrayLike","contents":{"role":{"json_class":"Pact::Term","data":{"generate":"admin","matcher":{"json_class":"Regexp","o":0,"s":"admin|user"}}}},"min":3},"id":{"json_class":"Pact::SomethingLike","contents":127},"name":"Baz"},"providerStates":[{"name":"user with id 127 exists"}],"metadata":{"Content-Type":"application/json; charset=utf-8"},"description":"a user","Type":{"id":127,"name":"Baz","access":[{"role":"admin"},{"role":"admin"},{"role":"admin"}]}} --consumer consumer --provider provider --pact-dir ~\go\src\spielwiese\pactexample/pacts --pact-specification-version 3]
2023/09/30 21:58:28 [DEBUG] command: ~\bin\pact\bin\pact-message.bat update {"contents":{"access":{"json_class":"Pact::ArrayLike","contents":{"role":{"json_class":"Pact::Term","data":{"generate":"admin","matcher":{"json_class":"Regexp","o":0,"s":"admin|user"}}}},"min":3},"id":{"json_class":"Pact::SomethingLike","contents":127},"name":"Baz"},"providerStates":[{"name":"user with id 127 exists"}],"metadata":{"Content-Type":"application/json; charset=utf-8"},"description":"a user","Type":{"id":127,"name":"Baz","access":[{"role":"admin"},{"role":"admin"},{"role":"admin"}]}} --consumer consumer --provider provider --pact-dir ~\go\src\spielwiese\pactexample/pacts --pact-specification-version 3
--- FAIL: TestExampleMessageConsumer_UserExists (6.39s)
\ ~\go\src\spielwiese\pactexample\pact.go:784: VerifyMessageConsumer failed: error creating message: exit status 255
2023/09/30 21:58:28 [DEBUG] pact setup logging
2023/09/30 21:58:28 [DEBUG] pact add message
2023/09/30 21:58:28 [DEBUG] setting Message decoding to type: *types.Order
2023/09/30 21:58:28 [DEBUG] verify message
2023/09/30 21:58:28 [DEBUG] pact setup logging
2023/09/30 21:58:28 [DEBUG] pact setup
2023/09/30 21:58:28 [DEBUG] client: adding pact message...
2023/09/30 21:58:28 [DEBUG] starting message service with args: [reify {"id":{"json_class":"Pact::SomethingLike","contents":42},"item":{"json_class":"Pact::Term","data":{"generate":"apple","matcher":{"json_class":"Regexp","o":0,"s":"(apple|orange)"}}}}]
2023/09/30 21:58:30 [DEBUG] narrowing type to
2023/09/30 21:58:30 [DEBUG] client: adding pact message...
2023/09/30 21:58:30 [DEBUG] starting message service with args: [update {"contents":{"id":{"json_class":"Pact::SomethingLike","contents":42},"item":{"json_class":"Pact::Term","data":{"generate":"apple","matcher":{"json_class":"Regexp","o":0,"s":"(apple|orange)"}}}},"providerStates":[{"name":"an order exists"}],"metadata":{"Content-Type":"application/json; charset=utf-8"},"description":"an order","Type":{"id":42,"item":"apple"}} --consumer consumer --provider provider --pact-dir ~\go\src\spielwiese\pactexample/pacts --pact-specification-version 3]
2023/09/30 21:58:30 [DEBUG] command: ~\bin\pact\bin\pact-message.bat update {"contents":{"id":{"json_class":"Pact::SomethingLike","contents":42},"item":{"json_class":"Pact::Term","data":{"generate":"apple","matcher":{"json_class":"Regexp","o":0,"s":"(apple|orange)"}}}},"providerStates":[{"name":"an order exists"}],"metadata":{"Content-Type":"application/json; charset=utf-8"},"description":"an order","Type":{"id":42,"item":"apple"}} --consumer consumer --provider provider --pact-dir ~\go\src\spielwiese\pactexample/pacts --pact-specification-version 3
--- FAIL: TestExampleMessageConsumer_Order (2.13s)
~\go\src\spielwiese\pactexample\pact.go:784: VerifyMessageConsumer failed: error creating message: exit status 255
FAIL
coverage: [no statements]
FAIL spielwiese/pactexample 8.552s
FAIL
pactexample_test.zip
The text was updated successfully, but these errors were encountered: