Imran Khan
06/16/2025, 11:45 AMpact.rootDir and other configurations, but I’m still facing the same issue.
Even after adding sleep before and after running the test cases, the tests pass, but the Pact contract file is not being generated.
Any help or pointers on how to resolve this would be greatly appreciated. Thanks in advance!
Logs when running TestCase (also looked for the path, by adding a print statement - but failed)
bazel test --nocache_test_results //access-control/contracts/openapi/v1:AccessControlConsumerPactTest
INFO: Invocation ID: 16bab404-9cf2-4e69-88d9-c46f58ef4b02
INFO: Analyzed target //access-control/contracts/openapi/v1:AccessControlConsumerPactTest (0 packages loaded, 252 targets configured).
INFO: Found 1 test target...
INFO: From Testing //access-control/contracts/openapi/v1:AccessControlConsumerPactTest:
==================== Test output for //access-control/contracts/openapi/v1:AccessControlConsumerPactTest:
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=debug; support was removed in 17.0
JUnit4 Test Runner
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by com.google.testing.junit.runner.junit4.JUnit4Runner (file:/private/var/tmp/_bazel_imrankhan/b141c088e4409f9b6c4d0f13116258fa/external/remote_java_tools/java_tools/Runner_deploy.jar)
WARNING: Please consider reporting this to the maintainers of com.google.testing.junit.runner.junit4.JUnit4Runner
WARNING: System::setSecurityManager will be removed in a future release
.SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.
Pact files will be written to: /private/var/tmp/_bazel_imrankhan/b141c088e4409f9b6c4d0f13116258fa/sandbox/darwin-sandbox/28/execroot/harness_monorepo/bazel-out/darwin_arm64-fastbuild/bin/access-control/contracts/openapi/v1/AccessControlConsumerPactTest.runfiles/harness_monorepo/pacts
.Pact files will be written to: /private/var/tmp/_bazel_imrankhan/b141c088e4409f9b6c4d0f13116258fa/sandbox/darwin-sandbox/28/execroot/harness_monorepo/bazel-out/darwin_arm64-fastbuild/bin/access-control/contracts/openapi/v1/AccessControlConsumerPactTest.runfiles/harness_monorepo/pacts
.Pact files will be written to: /private/var/tmp/_bazel_imrankhan/b141c088e4409f9b6c4d0f13116258fa/sandbox/darwin-sandbox/28/execroot/harness_monorepo/bazel-out/darwin_arm64-fastbuild/bin/access-control/contracts/openapi/v1/AccessControlConsumerPactTest.runfiles/harness_monorepo/pacts
<http://localhost:60308/users/123>
Time: 0.957
OK (3 tests)
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by com.google.testing.junit.runner.util.GoogleTestSecurityManager (file:/private/var/tmp/_bazel_imrankhan/b141c088e4409f9b6c4d0f13116258fa/external/remote_java_tools/java_tools/Runner_deploy.jar)
WARNING: Please consider reporting this to the maintainers of com.google.testing.junit.runner.util.GoogleTestSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
BazelTestRunner exiting with a return value of 0
JVM shutdown hooks (if any) will run now.
The JVM will exit once they complete.
-- JVM shutdown starting at 2025-06-16 11:40:14 --
================================================================================
Target //access-control/contracts/openapi/v1:AccessControlConsumerPactTest up-to-date:
/private/var/tmp/_bazel_imrankhan/b141c088e4409f9b6c4d0f13116258fa/execroot/harness_monorepo/bazel-out/darwin_arm64-fastbuild/bin/access-control/contracts/openapi/v1/AccessControlConsumerPactTest.jar
/private/var/tmp/_bazel_imrankhan/b141c088e4409f9b6c4d0f13116258fa/execroot/harness_monorepo/bazel-out/darwin_arm64-fastbuild/bin/access-control/contracts/openapi/v1/AccessControlConsumerPactTest
INFO: Elapsed time: 3.016s, Critical Path: 2.82s
INFO: 2 processes: 1 internal, 1 darwin-sandbox.
INFO: Build completed successfully, 2 total actions
//access-control/contracts/openapi/v1:AccessControlConsumerPactTest PASSED in 2.7s
Executed 1 out of 1 test: 1 test passes.Yousaf Nabi (pactflow.io)
Imran Khan
06/17/2025, 3:38 PMYousaf Nabi (pactflow.io)