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
Is your feature request related to a problem? Please describe.
When I ran make test, every test case worked fine except one error from test_extensible_load_manager :
✔ Network blue-green_green-pulsar Created 0.0s
✔ Container green-zookeeper Healthy 15.9s
✔ Container green-pulsar-init Exited 15.2s
✔ Container green-bookie Started 15.3s
✔ Container green-broker-2 Started 16.1s
✔ Container green-broker-1 Started 16.1s
✔ Container green-proxy Started 16.1s
until curl http://localhost:8081/metrics > /dev/null 2>&1 ; do sleep 1; done
# run blue-green migration test (run this test from this env to access both clusters)
go test -race -coverprofile=/tmp/coverage-blue_green_topic_migration -timeout=5m -tags extensible_load_manager -v -run TestBlueGreenMigrationTestSuite ./pulsar
go: github.com/99designs/keyring@v1.2.1 requires
github.com/dvsekhvalnov/jose2go@v1.5.0: missing go.sum entry; to add it:
go mod download github.com/dvsekhvalnov/jose2go
make: *** [test_extensible_load_manager] Error 1
This is because TestBlueGreenMigrationTestSuite currently uses host go environment to run test cases, and my environment doesn't have related dependencies:
# Makefile
test_extensible_load_manager: container
...
# run blue-green migration test (run this test from this env to access both clusters)
go test -race -coverprofile=/tmp/coverage-blue_green_topic_migration -timeout=5m -tags extensible_load_manager -v -run TestBlueGreenMigrationTestSuite ./pulsar
go tool cover -html=/tmp/coverage-blue_green_topic_migration -o coverage-blue_green_topic_migration.html
...
I think maybe we would better to use pulsar-client-go-test test docker like other Makefile test cases to avoid dependencies conflict.
Describe the solution you'd like
Since TestBlueGreenMigrationTestSuite use integration-tests/extensible-load-manager/docker-compose.yml as a blue cluster and use integration-tests/blue-green/docker-compose.yml as a green cluster, two clusters are in different network environments. So we may need to make them use the same network:
There are same service names in two docker-compose.yml files, we may need to use new unique service names in integration-tests/blue-green/docker-compose.yml green cluster service:
Since we already use test docker in step3, we cannot use service forwarding port anymore. Instead we may need to change service forwarding port to service name in pulsar/blue_green_migration_test.go:
# Before
for _, scenario := range []topicUnloadTestCase{
{
testCaseName: "proxyConnection",
blueAdminURL: "http://localhost:8080",
blueClientUrl: "pulsar://localhost:6650",
greenAdminURL: "http://localhost:8081",
migrationBody: `
{
"serviceUrl": "http://localhost:8081",
"serviceUrlTls":"https://localhost:8085",
"brokerServiceUrl": "pulsar://localhost:6651",
"brokerServiceUrlTls": "pulsar+ssl://localhost:6655"
}
`,
},
# After
for _, scenario := range []topicUnloadTestCase{
{
testCaseName: "proxyConnection",
blueAdminURL: "http://proxy:8080",
blueClientUrl: "pulsar://proxy:6650",
greenAdminURL: "http://green-proxy:8080",
migrationBody: `
{
"serviceUrl": "http://green-proxy:8080",
"brokerServiceUrl": "pulsar://green-proxy:6650",
}
`,
},
}
Describe alternatives you've considered
I think we can use docker run --rm --network=host in Makefile so that docker pulsar-client-go-test can have all docker network access priorities. But network=host option seems only work in Linux environment and can break platform compatibility.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When I ran
make test
, every test case worked fine except one error fromtest_extensible_load_manager
:This is because
TestBlueGreenMigrationTestSuite
currently uses host go environment to run test cases, and my environment doesn't have related dependencies:I think maybe we would better to use
pulsar-client-go-test
test docker like other Makefile test cases to avoid dependencies conflict.Describe the solution you'd like
TestBlueGreenMigrationTestSuite
useintegration-tests/extensible-load-manager/docker-compose.yml
as a blue cluster and useintegration-tests/blue-green/docker-compose.yml
as a green cluster, two clusters are in different network environments. So we may need to make them use the same network:docker-compose.yml
files, we may need to use new unique service names inintegration-tests/blue-green/docker-compose.yml
green cluster service:go test -race
withdocker run pulsar-client-go-test:latest bash -c
in Makefilepulsar/blue_green_migration_test.go
:Describe alternatives you've considered
I think we can use
docker run --rm --network=host
in Makefile so that dockerpulsar-client-go-test
can have all docker network access priorities. Butnetwork=host
option seems only work in Linux environment and can break platform compatibility.The text was updated successfully, but these errors were encountered: