Hi team I am facing issue related to consumer filt...
# pact-jvm
r
Hi team I am facing issue related to consumer filtering. • I have multiple consumer(say C1 and C2) for one provider. • Both consumer publish their individual contracts. • When feature branch of C1 publishes new contract, webhook triggers build for provider with pact Url and consumer name environment variables for AllowOverridePactUrl annotation. • When provider build runs it fails with Provider state call back failed for C2. Below error log shows filter consumer name is “sync-service” and has pact url but its still trying to find state in “TaskRunner” provider test. It should check in SyncServiceToProductCT
Copy code
TaskRunnerToProductCT > sync-service - GET Product by Product Code STANDARD_OUT
    [06:17:38,247][INFO] provider.junit5.PactVerificationStateChangeExtension - Invoking state change method 'GetByProductCode':SETUP
    Verifying a pact between sync-service and product-service
      [from Pact Broker <https://pact-broker.rc.vkp.viatorsystems.com/pacts/provider/product-service/consumer/sync-service/pact-version/9ba7240b86a1ad9f4900fa75e3dab5619744a4e5/metadata/Y3ZuPTk1MTJlNzIzNGEzMjdhYjg4ZjZkMjMxNTA5ZWE2NWUwYjliZTRkMGQmY3Z0W109ZmVhdHVyZV9TVVBQTFktODMxNS1za2lwLW5vbi1zYXBpLXByb2R1Y3RzLXdoZW4tZW5hYmxlLXNjaGVkdWxpbmctcGFjJnc9dHJ1ZQ>]
      Given GetByProductCode
      GET Product by Product Code
    [06:17:38,270][WARN] api.text.TextContentHelper - ContentRef not found :: {"contentRef":"CR-REF1"}
        returns a response which
          has status code 200 (OK)
          has a matching body (OK)
    [06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - Not all of the 7 were verified. The following were missing:
    [06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator -     Get First Publish Requested User By product code
    [06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator -     GET Supplier by Product Code
    [06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator -     Lookup Product Details
    [06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator -     GET product code request
    [06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator -     GET products status
    [06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator -     GET Supplier by Product Code
SupplyTaskRunnerToProductServiceCT > sync-service - Get First Publish Requested User By product code STANDARD_OUT
    [06:17:38,279][ERROR] provider.junit5.PactVerificationStateChangeExtension - Provider state change callback failed
    au.com.dius.pact.provider.junitsupport.MissingStateChangeMethod: Did not find a test class method annotated with @State("GetFirstPublishRequestedUser") 
    for Interaction "Get First Publish Requested User By product code" 
    with Consumer "sync-service"
    	at au.com.dius.pact.provider.junit5.PactVerificationStateChangeExtension.invokeStateChangeMethods(PactVerificationStateChangeExtension.kt:125) ~[junit5-4.1.32.jar:4.1.32]
Please suggest how to fix it
version:
Copy code
'au.com.dius.pact.provider:junit5:4.1.32'
Copy code
@Provider("product-service")
@VerificationReports
@PactBroker(consumerVersionSelectors = {@VersionSelector(consumer = "sync-service", tag = "develop")})
@AllowOverridePactUrl
public class SyncServiceToProductCT {
u
Can you raise an issue for this?
r