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

[#498] fix(test): Fix port conflict issue in UT #499

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

jerryshao
Copy link
Contributor

What changes were proposed in this pull request?

Change the TestGravitonServer to use random port instead of a default one to avoid port conflicts.

Why are the changes needed?

The port conflicts issue makes the test quite flaky, see #498

Fix: #498

Does this PR introduce any user-facing change?

Np.

How was this patch tested?

Existing UTs.

@jerryshao jerryshao self-assigned this Oct 12, 2023
@github-actions
Copy link

github-actions bot commented Oct 12, 2023

Code Coverage Report

Overall Project 62.54% 🟢

There is no coverage information present for the Files changed

@jerryshao jerryshao closed this Oct 12, 2023
@jerryshao jerryshao reopened this Oct 12, 2023
yuqi1129
yuqi1129 previously approved these changes Oct 12, 2023
ENTRY_KV_ROCKSDB_BACKEND_PATH.getKey(),
ROCKS_DB_STORE_PATH,
GravitonServer.WEBSERVER_CONF_PREFIX + JettyServerConfig.WEBSERVER_HTTP_PORT.getKey(),
String.valueOf(RESTUtils.findAvailablePort(5000, 6000))),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw the same exception in com.datastrato.graviton.server.web.TestJettyServer, is it need to do the same process?

> Task :server-common:test

TestJettyServer > testStartAndStop() FAILED
    java.lang.RuntimeException at TestJettyServer.java:48
        Caused by: java.io.IOException at TestJettyServer.java:48
            Caused by: java.net.BindException at TestJettyServer.java:48

@jerryshao jerryshao closed this Oct 12, 2023
@jerryshao jerryshao reopened this Oct 12, 2023
@jerryshao jerryshao changed the title [#498] fix(test): Fix port conflict issue in TestGravitonServer [#498] fix(test): Fix port conflict issue in UT Oct 12, 2023
@jerryshao jerryshao closed this Oct 12, 2023
@jerryshao jerryshao reopened this Oct 12, 2023
@jerryshao jerryshao merged commit 140a0da into apache:main Oct 12, 2023
4 checks passed
Clearvive pushed a commit that referenced this pull request Oct 17, 2023
### What changes were proposed in this pull request?

Change the `TestGravitonServer` to use random port instead of a default
one to avoid port conflicts.

### Why are the changes needed?

The port conflicts issue makes the test quite flaky, see #498

Fix: #498 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing UTs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug report] TestGravitonServer#testStartAndStop is very flaky
3 participants