apache / apache/netbeans

java/java.lsp.server test improvements

Open
#3,716 3 comments 0 reactions 0 assignees View on GitHub
CI kind:bug
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans latest daily build

### What happened

ConnectionSpectTest launches a dummy server on port 0, this generates 441 failed connections in a loop in my box. Test fails afterwards.

### How to reproduce

Difficult to reproduce. What I tried: get a fresh clone, set JDK8 on your $PATH/$JAVA_HOME, do an "ant build" and then test the "java/java.lsp.server" module.

```
export OPTS="-Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json -quiet -Dcluster.config=java -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false -Dtest-unit-sys-prop.ignore.random.failures=true"
echo "OPTS"
ant $OPTS build
ant $OPTS -f java/java.lsp.server test | tee java.lsp.server.test.-log.txt
```

Will try to attach a file if github/issues allows it.

### Did this work correctly in an earlier version?

No

### Operating System

Linux fenix 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux

### JDK

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)

### Apache NetBeans packaging

Own source build

### Anything else

_No response_

### Are you willing to submit a pull request?

Yes

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Start with the java/java.lsp.server module and its ConnectionSpectTest test, then run the documented ant test command to observe the repeated failed connections. Review how the dummy server is launched on port 0 and confirm the test completes without the connection failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.