Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable "gcloud" profile for gcloud session testing. #5568

Closed
wants to merge 21 commits into from

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Nov 3, 2020

Signed-off-by: Joakim Erdfelt joakim.erdfelt@gmail.com

@joakime joakime requested review from olamy and janbartel November 3, 2020 14:50
@joakime joakime self-assigned this Nov 3, 2020
@joakime
Copy link
Contributor Author

joakime commented Nov 3, 2020

We need to enable gcloud session testing on CI.

This would allow us to vet dependency updates for things like grpc (#5510)

@olamy
Copy link
Member

olamy commented Nov 9, 2020

looking at it. currently this fail because com.google.cloud.datastore.testing.LocalDatastoreHelper is starting some datastore using command line gcloud I'm trying a solution using a remote instance

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime force-pushed the jetty-9.4.x-enable-gcloud-testing branch from a901bef to 55e35a1 Compare November 9, 2020 13:12
janbartel and others added 3 commits November 9, 2020 17:45
…able-gcloud-testing

Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
@janbartel
Copy link
Contributor

So the exceptions reported are IOExceptions, connection refused.

This is because the com.google.cloud.datastore.testing.LocalDatastoreHelper class calls this method on com.google.cloud.testing.BaseEmulatorHelper to find a free port to start the server process on:

protected static int findAvailablePort(int defaultPort) {
try (ServerSocket tempSocket = new ServerSocket(0)) {
return tempSocket.getLocalPort();
} catch (IOException e) {
return defaultPort;
}
}

This won't work, as we discovered in the jetty-maven-plugin integration tests. You can't ask ServerSocket to find you an available port and just use the port number, you have to use the ServerSocket returned, otherwise the os may allocate that port to another user by the time you get around to trying to connect to it.

I've checked the latest available google code for the google-cloud-core jar (v 1.94.0) and this problem is still there.

Can you look into how we would dockerize this test instead, as that may avoid this problem.

olamy and others added 13 commits November 11, 2020 20:43
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
@olamy
Copy link
Member

olamy commented Nov 16, 2020

closing in favour of #5651 5651

@olamy olamy closed this Nov 16, 2020
@olamy olamy deleted the jetty-9.4.x-enable-gcloud-testing branch November 16, 2020 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants