Closed orj closed 1 year ago
Here's a trace.
2023-01-10T05:16:47.378912Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact - ref = 1, keys = [1]
2023-01-10T05:16:47.378942Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact before - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [], metadata: {"pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V3 } }
2023-01-10T05:16:47.378964Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact after - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [], metadata: {"pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.383718Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact - ref = 1, keys = [1]
2023-01-10T05:16:47.383729Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact before - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [], metadata: {"pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.383740Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact after - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [], metadata: {"namespace1": Object {"name1": String("value1")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.384048Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact - ref = 1, keys = [1]
2023-01-10T05:16:47.384051Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact before - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [], metadata: {"namespace1": Object {"name1": String("value1")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.384325Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact after - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.384796Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_pact - ref = 1, keys = [1]
2023-01-10T05:16:47.384804Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_pact before - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.384831Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_pact after - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [SynchronousHttp { id: None, key: None, description: "an interaction with header item matching regex ", provider_states: [], request: HttpRequest { method: "GET", path: "/", query: None, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, response: HttpResponse { status: 200, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, comments: {}, pending: false, plugin_config: {}, interaction_markup: InteractionMarkup { markup: "", markup_type: "" }, transport: None }], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.392012Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - index = 1, interaction = 1
2023-01-10T05:16:47.392017Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - keys = [1]
2023-01-10T05:16:47.392278Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - inner = PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [SynchronousHttp { id: None, key: None, description: "an interaction with header item matching regex ", provider_states: [], request: HttpRequest { method: "GET", path: "/", query: None, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, response: HttpResponse { status: 200, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, comments: {}, pending: false, plugin_config: {}, interaction_markup: InteractionMarkup { markup: "", markup_type: "" }, transport: None }], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 }
2023-01-10T05:16:47.392704Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - index = 1, interaction = 1
2023-01-10T05:16:47.392712Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - keys = [1]
2023-01-10T05:16:47.392715Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - inner = PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [SynchronousHttp { id: None, key: None, description: "an interaction with header item matching regex ", provider_states: [], request: HttpRequest { method: "GET", path: "/interaction", query: None, headers: None, body: Missing, matching_rules: MatchingRules { rules: {PATH: MatchingRuleCategory { name: PATH, rules: {} }} }, generators: Generators { categories: {} } }, response: HttpResponse { status: 200, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, comments: {}, pending: false, plugin_config: {}, interaction_markup: InteractionMarkup { markup: "", markup_type: "" }, transport: None }], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 }
2023-01-10T05:16:47.392920Z DEBUG ThreadId(02) pact_ffi::mock_server::handles: detected pact:matcher:type, will configure a matcher
2023-01-10T05:16:47.392926Z TRACE ThreadId(02) pact_ffi::mock_server::handles: matching_rule = Some(Regex("\\w+"))
2023-01-10T05:16:47.392945Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - index = 1, interaction = 1
2023-01-10T05:16:47.392946Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - keys = [1]
2023-01-10T05:16:47.392949Z TRACE ThreadId(02) pact_ffi::mock_server::handles: with_interaction - inner = PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [SynchronousHttp { id: None, key: None, description: "an interaction with header item matching regex ", provider_states: [], request: HttpRequest { method: "GET", path: "/interaction", query: None, headers: Some({"item": ["wordchars"]}), body: Missing, matching_rules: MatchingRules { rules: {PATH: MatchingRuleCategory { name: PATH, rules: {} }, HEADER: MatchingRuleCategory { name: HEADER, rules: {DocPath { path_tokens: [Root, Field("item"), Index(0)], expr: "$.item[0]" }: RuleList { rules: [Regex("\\w+")], rule_logic: And, cascaded: false }} }} }, generators: Generators { categories: {} } }, response: HttpResponse { status: 200, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, comments: {}, pending: false, plugin_config: {}, interaction_markup: InteractionMarkup { markup: "", markup_type: "" }, transport: None }], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 }
2023-01-10T05:16:47.393443Z DEBUG ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server: pact_ffi::mock_server::pactffi_create_mock_server_for_transport FFI function invoked
2023-01-10T05:16:47.393455Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server: @param pact = PactHandle { pact_ref: 1 }
2023-01-10T05:16:47.393459Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server: @param addr = 0x6000000cd280
2023-01-10T05:16:47.393461Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server: @param port = 5956
2023-01-10T05:16:47.393466Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server: @param transport = 0x6000000cd250
2023-01-10T05:16:47.393468Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server: @param transport_config = 0x0
2023-01-10T05:16:47.393475Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server::handles: with_pact - ref = 1, keys = [1]
2023-01-10T05:16:47.393477Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server::handles: with_pact before - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [SynchronousHttp { id: None, key: None, description: "an interaction with header item matching regex ", provider_states: [], request: HttpRequest { method: "GET", path: "/interaction", query: None, headers: Some({"item": ["wordchars"]}), body: Missing, matching_rules: MatchingRules { rules: {PATH: MatchingRuleCategory { name: PATH, rules: {} }, HEADER: MatchingRuleCategory { name: HEADER, rules: {DocPath { path_tokens: [Root, Field("item"), Index(0)], expr: "$.item[0]" }: RuleList { rules: [Regex("\\w+")], rule_logic: And, cascaded: false }} }} }, generators: Generators { categories: {} } }, response: HttpResponse { status: 200, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, comments: {}, pending: false, plugin_config: {}, interaction_markup: InteractionMarkup { markup: "", markup_type: "" }, transport: None }], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: false, specification_version: V4 } }
2023-01-10T05:16:47.393727Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_plugin_driver::catalogue_manager: register_core_entries([CatalogueEntry { entry_type: TRANSPORT, provider_type: CORE, plugin: None, key: "http", values: {} }, CatalogueEntry { entry_type: TRANSPORT, provider_type: CORE, plugin: None, key: "https", values: {} }])
2023-01-10T05:16:47.393802Z DEBUG ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_plugin_driver::catalogue_manager: Updated catalogue entries:
core/transport/http
core/transport/https
2023-01-10T05:16:47.393822Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_plugin_driver::catalogue_manager: register_core_entries([CatalogueEntry { entry_type: CONTENT_MATCHER, provider_type: CORE, plugin: None, key: "xml", values: {"content-types": "application/.*xml,text/xml"} }, CatalogueEntry { entry_type: CONTENT_MATCHER, provider_type: CORE, plugin: None, key: "json", values: {"content-types": "application/.*json,application/json-rpc,application/jsonrequest"} }, CatalogueEntry { entry_type: CONTENT_MATCHER, provider_type: CORE, plugin: None, key: "text", values: {"content-types": "text/plain"} }, CatalogueEntry { entry_type: CONTENT_MATCHER, provider_type: CORE, plugin: None, key: "multipart-form-data", values: {"content-types": "multipart/form-data,multipart/mixed"} }, CatalogueEntry { entry_type: CONTENT_GENERATOR, provider_type: CORE, plugin: None, key: "json", values: {"content-types": "application/.*json,application/json-rpc,application/jsonrequest"} }, CatalogueEntry { entry_type: CONTENT_GENERATOR, provider_type: CORE, plugin: None, key: "binary", values: {"content-types": "application/octet-stream"} }])
2023-01-10T05:16:47.393921Z DEBUG ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_plugin_driver::catalogue_manager: Updated catalogue entries:
core/content-generator/binary
core/content-generator/json
core/content-matcher/json
core/content-matcher/multipart-form-data
core/content-matcher/text
core/content-matcher/xml
2023-01-10T05:16:47.394028Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_plugin_driver::catalogue_manager: register_core_entries([CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v2-regex", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v2-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-number-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-integer-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-decimal-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-date", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-time", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-datetime", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v2-min-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v2-max-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v2-minmax-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-includes", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-null", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v4-equals-ignore-order", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v4-min-equals-ignore-order", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v4-max-equals-ignore-order", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v4-minmax-equals-ignore-order", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v3-content-type", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v4-array-contains", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v1-equality", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v4-not-empty", values: {} }, CatalogueEntry { entry_type: MATCHER, provider_type: CORE, plugin: None, key: "v4-semver", values: {} }])
2023-01-10T05:16:47.394259Z DEBUG ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_plugin_driver::catalogue_manager: Updated catalogue entries:
core/matcher/v1-equality
core/matcher/v2-max-type
core/matcher/v2-min-type
core/matcher/v2-minmax-type
core/matcher/v2-regex
core/matcher/v2-type
core/matcher/v3-content-type
core/matcher/v3-date
core/matcher/v3-datetime
core/matcher/v3-decimal-type
core/matcher/v3-includes
core/matcher/v3-integer-type
core/matcher/v3-null
core/matcher/v3-number-type
core/matcher/v3-time
core/matcher/v4-array-contains
core/matcher/v4-equals-ignore-order
core/matcher/v4-max-equals-ignore-order
core/matcher/v4-min-equals-ignore-order
core/matcher/v4-minmax-equals-ignore-order
core/matcher/v4-not-empty
core/matcher/v4-semver
2023-01-10T05:16:47.394358Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: mio::poll: registering event source with poller: token=Token(2147483649), interests=READABLE
2023-01-10T05:16:47.394485Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: mio::poll: registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
2023-01-10T05:16:47.394504Z DEBUG ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_mock_server::mock_server: Started mock server on 127.0.0.1:5956
2023-01-10T05:16:47.394526Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server::handles: with_pact after - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Consumer" }, provider: Provider { name: "-[InteractionHeaderTests testHeaderMatchingRegex]-Provider" }, interactions: [SynchronousHttp { id: None, key: None, description: "an interaction with header item matching regex ", provider_states: [], request: HttpRequest { method: "GET", path: "/interaction", query: None, headers: Some({"item": ["wordchars"]}), body: Missing, matching_rules: MatchingRules { rules: {PATH: MatchingRuleCategory { name: PATH, rules: {} }, HEADER: MatchingRuleCategory { name: HEADER, rules: {DocPath { path_tokens: [Root, Field("item"), Index(0)], expr: "$.item[0]" }: RuleList { rules: [Regex("\\w+")], rule_logic: And, cascaded: false }} }} }, generators: Generators { categories: {} } }, response: HttpResponse { status: 200, headers: None, body: Missing, matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }, comments: {}, pending: false, plugin_config: {}, interaction_markup: InteractionMarkup { markup: "", markup_type: "" }, transport: None }], metadata: {"namespace1": Object {"name1": String("value1")}, "namespace2": Object {"name2": String("value2")}, "pactRust": Object {"ffi": String("0.3.15")}}, plugin_data: [] }, mock_server_started: true, specification_version: V4 } }
2023-01-10T05:16:47.394651Z TRACE ThreadId(02) pactffi_create_mock_server_for_transport{pact=PactHandle { pact_ref: 1 } addr=0x6000000cd280 port=5956 transport=0x6000000cd250 transport_config=0x0}: pact_ffi::mock_server: pactffi_create_mock_server_for_transport FFI function completed output=5956
2023-01-10T05:16:47.432303Z TRACE tokio-runtime-worker mio::poll: registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
2023-01-10T05:16:47.432361Z TRACE tokio-runtime-worker hyper::proto::h1::conn: Conn::read_head
2023-01-10T05:16:47.432370Z TRACE tokio-runtime-worker hyper::proto::h1::conn: flushed({role=server}): State { reading: Init, writing: Init, keep_alive: Busy }
2023-01-10T05:16:47.433101Z TRACE tokio-runtime-worker hyper::proto::h1::conn: Conn::read_head
2023-01-10T05:16:47.433120Z TRACE tokio-runtime-worker hyper::proto::h1::io: received 239 bytes
2023-01-10T05:16:47.433134Z TRACE tokio-runtime-worker parse_headers: hyper::proto::h1::role: Request.parse bytes=239
2023-01-10T05:16:47.433142Z TRACE tokio-runtime-worker parse_headers: hyper::proto::h1::role: Request.parse Complete(239)
2023-01-10T05:16:47.433163Z DEBUG tokio-runtime-worker hyper::proto::h1::io: parsed 7 headers
2023-01-10T05:16:47.433165Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body is empty
2023-01-10T05:16:47.433172Z DEBUG tokio-runtime-worker pact_mock_server::hyper_server: Creating pact request from hyper request
2023-01-10T05:16:47.433174Z DEBUG tokio-runtime-worker pact_mock_server::hyper_server: Extracting query from uri /interaction
2023-01-10T05:16:47.433177Z TRACE tokio-runtime-worker pact_mock_server::hyper_server: path_and_query -> /interaction
2023-01-10T05:16:47.433197Z INFO tokio-runtime-worker pact_mock_server::hyper_server: Received request HTTP Request ( method: GET, path: /interaction, query: None, headers: Some({"accept-language": ["en-US", "en;q=0.9"], "accept": ["*/*"], "item": ["stuff_that_is_words"], "accept-encoding": ["gzip", "deflate"], "host": ["127.0.0.1:5956"], "connection": ["keep-alive"], "user-agent": ["xctest/21501 CFNetwork/1402.0.8 Darwin/22.1.0"]}), body: Empty )
2023-01-10T05:16:47.433307Z INFO tokio-runtime-worker pact_matching: comparing to expected HTTP Request ( method: GET, path: /interaction, query: None, headers: Some({"item": ["wordchars"]}), body: Missing )
2023-01-10T05:16:47.433312Z DEBUG tokio-runtime-worker pact_matching: body: ''
2023-01-10T05:16:47.433313Z DEBUG tokio-runtime-worker pact_matching: matching_rules: MatchingRules { rules: {PATH: MatchingRuleCategory { name: PATH, rules: {} }, HEADER: MatchingRuleCategory { name: HEADER, rules: {DocPath { path_tokens: [Root, Field("item"), Index(0)], expr: "$.item[0]" }: RuleList { rules: [Regex("\\w+")], rule_logic: And, cascaded: false }} }} }
2023-01-10T05:16:47.433318Z DEBUG tokio-runtime-worker pact_matching: generators: Generators { categories: {} }
2023-01-10T05:16:47.433335Z TRACE tokio-runtime-worker pact_models::matchingrules: matcher_is_defined: for category path and path [] -> false
2023-01-10T05:16:47.433406Z DEBUG tokio-runtime-worker matches_with{self="/interaction" actual="/interaction" matcher=Equality cascaded=false}: pact_matching::matchers: String -> String: comparing '/interaction' to '/interaction' ==> true cascaded=false matcher=Equality
2023-01-10T05:16:47.433420Z DEBUG tokio-runtime-worker pact_matching: expected content type = '*/*', actual content type = '*/*'
2023-01-10T05:16:47.433544Z TRACE tokio-runtime-worker pact_models::path_exp: Calculating weight for path tokens '[Root, Field("item"), Index(0)]' and path '["$", "Content-Type"]'
2023-01-10T05:16:47.433549Z TRACE tokio-runtime-worker pact_models::path_exp: Calculated weight (0, 3) for path '$.item[0]' and '["$", "Content-Type"]'
2023-01-10T05:16:47.433552Z DEBUG tokio-runtime-worker pact_matching: content type header matcher = 'RuleList { rules: [], rule_logic: And, cascaded: false }'
2023-01-10T05:16:47.433570Z TRACE tokio-runtime-worker pact_models::path_exp: Calculating weight for path tokens '[Root, Field("item"), Index(0)]' and path '["$", "item"]'
2023-01-10T05:16:47.433572Z TRACE tokio-runtime-worker pact_models::path_exp: Calculated weight (0, 3) for path '$.item[0]' and '["$", "item"]'
2023-01-10T05:16:47.433574Z TRACE tokio-runtime-worker pact_models::matchingrules: matcher_is_defined: for category header and path ["$", "item"] -> false
2023-01-10T05:16:47.433583Z DEBUG tokio-runtime-worker matches_with{self="wordchars" actual="stuff_that_is_words" matcher=Equality cascaded=false}:matches_with{self="wordchars" actual="stuff_that_is_words" matcher=Equality cascaded=false}: pact_matching::matchers: String -> String: comparing 'wordchars' to 'stuff_that_is_words' ==> false cascaded=false matcher=Equality
2023-01-10T05:16:47.433681Z DEBUG tokio-runtime-worker pact_matching: --> Mismatches: [HeaderMismatch { key: "item", expected: "wordchars", actual: "stuff_that_is_words", mismatch: "Mismatch with header 'item': Expected 'wordchars' to be equal to 'stuff_that_is_words'" }]
2023-01-10T05:16:47.433727Z DEBUG tokio-runtime-worker pact_mock_server::hyper_server: Request did not match: Request did not match - HTTP Request ( method: GET, path: /interaction, query: None, headers: Some({"item": ["wordchars"]}), body: Missing ) 0) Mismatch with header 'item': Expected 'wordchars' to be equal to 'stuff_that_is_words'
2023-01-10T05:16:47.433778Z TRACE tokio-runtime-worker encode_headers: hyper::proto::h1::role: Server::encode status=500, body=Some(Known(506)), req_method=Some(GET)
2023-01-10T05:16:47.433787Z TRACE tokio-runtime-worker hyper::proto::h1::io: buffer.queue self.len=201 buf.len=506
2023-01-10T05:16:47.433802Z DEBUG tokio-runtime-worker hyper::proto::h1::io: flushed 707 bytes
2023-01-10T05:16:47.433804Z TRACE tokio-runtime-worker hyper::proto::h1::conn: flushed({role=server}): State { reading: Init, writing: Init, keep_alive: Idle }
2023-01-10T05:16:47.435317Z DEBUG ThreadId(02) pact_matching::metrics: Could not get the tokio runtime, will not send metrics - there is no reactor running, must be called from the context of a Tokio 1.x runtime
2023-01-10T05:16:47.435328Z DEBUG ThreadId(02) pact_mock_server::server_manager: Shutting down mock server with ID 1fefc781-72a3-4407-aa22-ceac417b6ade - MockServerMetrics { requests: 1 }
2023-01-10T05:16:47.435336Z DEBUG ThreadId(02) pact_mock_server::mock_server: Mock server 1fefc781-72a3-4407-aa22-ceac417b6ade shutdown - MockServerMetrics { requests: 1 }
2023-01-10T05:16:47.435359Z DEBUG tokio-runtime-worker hyper::server::shutdown: signal received, starting graceful shutdown
2023-01-10T05:16:47.435365Z TRACE tokio-runtime-worker mio::poll: deregistering event source from poller
2023-01-10T05:16:47.435389Z TRACE tokio-runtime-worker hyper::proto::h1::conn: disable_keep_alive; closing idle connection
2023-01-10T05:16:47.435391Z TRACE tokio-runtime-worker hyper::proto::h1::conn: State::close()
2023-01-10T05:16:47.435392Z TRACE tokio-runtime-worker hyper::proto::h1::conn: State::close_read()
2023-01-10T05:16:47.435394Z TRACE tokio-runtime-worker hyper::proto::h1::conn: State::close_write()
2023-01-10T05:16:47.435396Z TRACE tokio-runtime-worker hyper::proto::h1::conn: flushed({role=server}): State { reading: Closed, writing: Closed, keep_alive: Disabled }
2023-01-10T05:16:47.435413Z TRACE tokio-runtime-worker hyper::proto::h1::conn: shut down IO complete
2023-01-10T05:16:47.435416Z TRACE tokio-runtime-worker mio::poll: deregistering event source from poller
Duplicate of #238
I've been trying to support the integration JSON format with headers using code similar to:
But it doesn't seem to work. Very similar code using
pactffi_with_query_parameter_v2
does seem to work (at least for spec v3 and below matching rules).