networknt / networknt/light-bot
when test case fails, the server light-bot is not stopped
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I have added a new test to ensure that dynamic port works with two instances of petstore services. With release 1.5.30, it should fail as we have a bug in the release. The light-bot reports the error but doesn't stop the process. Here is the stacktrace.
21:37:44.772 [main] INFO c.n.bot.develop.DevelopBuildTask test - start testing...
21:37:45.772 [main] INFO c.n.bot.develop.DevelopBuildTask test - host = https://localhost:2400, path=/v1/pets/111, method=get, request header=null, request body=null
21:37:45.772 [main] INFO c.n.bot.develop.DevelopBuildTask test - expected status = 200 response header = {content-type=application/json} response body = {$.name=Jessica Right, $.id=1}
21:37:45.775 [main] ERROR com.networknt.bot.core.TestUtil request - request Exception: host = https://localhost:2400 path = /v1/pets/111 method = GET header = null
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:321)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:561)
21:37:45.775 [main] INFO c.n.bot.develop.DevelopBuildTask test - shutdown servers
21:37:45.775 [main] ERROR c.n.bot.develop.DevelopBuildTask execute - Task could not be executed and failed with: null
21:37:45.775 [main] INFO c.n.bot.develop.DevelopBuildTask stop - shutdown servers
21:37:45.775 [main] INFO com.networknt.bot.cli.Cli run - build successfully!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating DevelopBuildTask and tracing its test, execute, and stop methods, then check how Cli.run reports the result. Reproduce the dynamic-port test with two Petstore service instances described in the issue. Done means a failed request stops the server processes and the CLI reports the task as failed rather than successfully completing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100