You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have triple checked, that there are no unhandled promises in my code and have read the section on intermittent test failures
I have set my log level to debug and attached a log file showing the complete request/response cycle
For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem
Expected behaviour
When the log level is set to INFO, there should NOT be any logs from pact internals/core.
When the log level is set to DEBUG/TRACE, then the logs from pact core should display.
Actual behaviour
When the log level is set to INFO, there are still some logs showing the pact internals which should only show if log level was DEBUG or TRACE.
~/Documents/projects/open/pact-bug/ npm test
> [email protected] test
> jest __tests__/ --runInBand
RUNS __tests__/simple-example.pact.js
RUNS __tests__/simple-example.pact.js
2023-09-06T02:20:00.525252Z INFO tokio-runtime-worker pact_mock_server::hyper_server: Received request GET /dogs
2023-09-06T02:20:00.526028Z INFO tokio-runtime-worker pact_matching: comparing to expected HTTP Request ( method: GET, path: /dogs, query: None, headers: Some({"Accept": ["application/json"], "Host": ["localhost"]}), body: Missing )
[12:20:00.532] ERROR (97438): [email protected]: Test failed for the following reasons:
Mock server failed with the following mismatches:
0) The following request was incorrect:
GET /dogs
RUNS __tests__/simple-example.pact.js
2023-09-06T02:20:00.536053Z INFO tokio-runtime-worker pact_mock_server::hyper_server: Received request GET /cats
2023-09-06T02:20:00.536094Z INFO tokio-runtime-worker pact_matching: comparing to expected HTTP Request ( method: GET, path: /cats, query: Some({"catId[]": ["1", "1"]}), headers: Some({"Accept": ["application/json"]}), body: Missing )
2023-09-06T02:20:00.537772Z INFO tokio-runtime-worker pact_mock_server::hyper_server: Request matched, sending response
2023-09-06T02:20:00.540438Z WARN ThreadId(02) pact_models::pact: Note: Existing pact is an older specification version (V3), and will be upgraded
FAIL __tests__/simple-example.pact.jsdId(02) pact_models::content_types: Failed to parse 'application/json, application/json' as a content type: mime parse error: an invalid token was encountered, 2C at position 16
Dogs API
✕ returns a successful body (30 ms)
Cats API
✓ returns a successful body (10 ms)
● Dogs API › returns a successful body
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 total
Time: 0.619 s, estimated 1 s
The text was updated successfully, but these errors were encountered:
satishautade
added
bug
Indicates an unexpected problem or unintended behavior
triage
This issue is yet to be triaged by a maintainer
labels
Sep 6, 2023
Software versions
Issue Checklist
Please confirm the following:
Expected behaviour
When the log level is set to INFO, there should NOT be any logs from pact internals/core.
When the log level is set to DEBUG/TRACE, then the logs from pact core should display.
Actual behaviour
When the log level is set to INFO, there are still some logs showing the pact internals which should only show if log level was DEBUG or TRACE.
Steps to reproduce
npm install && npm test
npm install && npm test
Relevant log files
pact-failure-debug-log.log
The text was updated successfully, but these errors were encountered: