Giter VIP home page Giter VIP logo

Comments (2)

rmartine-ias avatar rmartine-ias commented on May 20, 2024

Running into this issue as well. Our build system runs tests in a docker container; this is an issue getting in the way of using the pact-protobuf-plugin.

Steps to reproduce:

git clone https://github.com/pact-foundation/pact-plugins
cd pact-plugins/
docker run -it -v "$PWD:/mnt" -w /mnt debian:latest

# In container:

## Install Java
apt update
apt install -y openjdk-11-jre
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64/

## Install protobuf plugin
apt install -y wget
mkdir -p ~/.pact/plugins/protobuf-0.1.16
wget https://github.com/pactflow/pact-protobuf-plugin/releases/download/v-0.1.16/pact-plugin.json -O ~/.pact/plugins/protobuf-0.1.16/pact-plugin.json

### AMD64
# wget https://github.com/pactflow/pact-protobuf-plugin/releases/download/v-0.1.16/pact-protobuf-plugin-linux-x86_64.gz -O ~/.pact/plugins/protobuf-0.1.16/pact-protobuf-plugin.gz
### ARM64
wget https://github.com/pactflow/pact-protobuf-plugin/releases/download/v-0.1.16/pact-protobuf-plugin-linux-aarch64.gz -O ~/.pact/plugins/protobuf-0.1.16/pact-protobuf-plugin.gz

gunzip -N ~/.pact/plugins/protobuf-0.1.16/pact-protobuf-plugin.gz
chmod +x ~/.pact/plugins/protobuf-0.1.16/pact-protobuf-plugin

## Execute test
cd examples/gRPC/area_calculator/consumer-jvm/
./gradlew test --debug

# 2022-11-16T21:00:02.543+0000 [DEBUG] [TestEventLogger]     io.pact.plugins.jvm.core.PactPluginMockServerErrorException: Plugin protobuf failed to start a mock server: Failed to start gRPC mock server: Cannot assign requested address (os error 99)
# 2022-11-16T21:00:03.142+0000 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 10s

Setting hostInterface = "127.0.0.1" on line 79 of PactConsumerTest.java (arg to @MockServerConfig) yields the same error.

Modifying this line in pact-protobuf-plugin to be 127.0.0.1, and the same for this line in PactConsumerTest makes the tests succeed.

So I am pretty sure that @jojoxhsieh is right, that the config isn't passed to the plugin, because very manually setting the host (via recompiling the plugin) makes the tests pass, but setting hostInterface doesn't.

from pact-plugins.

YOU54F avatar YOU54F commented on May 20, 2024

Great bug report!

from pact-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.