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

Fixes #4070 - Set Piranha Arquillian shutdown timeout to 30 seconds #4071

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void undeploy(Archive<?> archive) throws DeploymentException {
LOGGER.log(INFO, "Waiting for Piranha to be shutdown");

long startTime = System.currentTimeMillis();
process.waitFor(5, TimeUnit.MINUTES);
process.waitFor(30, TimeUnit.SECONDS);
Long finishTime = System.currentTimeMillis();

LOGGER.log(INFO, "Piranha has shutdown\n It took {0} milliseconds", finishTime - startTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ public int read() throws IOException {
if (finished || webApplicationRequest.getContentLength() == 0) {
return -1;
}
read = inputStream.read();
index++;
if (index == webApplicationRequest.getContentLength() || read == -1) {
finished = true;
if (inputStream.available() > 0) {
read = inputStream.read();
index++;
if (index == webApplicationRequest.getContentLength() || read == -1) {
finished = true;
}
}
} else {
if (inputStream.available() > 0) {
Expand Down
6 changes: 3 additions & 3 deletions external/coreprofile-tck/rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ mvn -Dit.test=TestName verify
To run a single test in debug mode, use the following command:

```
mvn -Dmaven.surefire.debug -Dit.test=TestName verify
mvn -Dmaven.failsafe.debug -Dit.test=TestName verify
```

To run a single test in debug mode with a specific port, use the following
command:

```
mvn -Dmaven.surefire.debug -Dmaven.surefire.debug.port=5005 -Dit.test=TestName verify
mvn -Dmaven.failsafe.debug -Dmaven.failsafe.debug.port=5005 -Dit.test=TestName verify
```

To run a single test in debug mode with a specific port and suspend, use the
following command:

```
mvn -Dmaven.surefire.debug -Dmaven.surefire.debug.port=5005 -Dmaven.surefire.debug.suspend=y -Dit.test=TestName verify
mvn -Dmaven.failsafe.debug -Dmaven.failsafe.debug.port=5005 -Dmaven.failsafe.debug.suspend=y -Dit.test=TestName verify
```

To run a single test and put Piranha in debug and susspend mode use the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class DefaultHttpServer implements HttpServer {
/**
* Stores the SO_TIMEOUT.
*/
protected int soTimeout;
protected int soTimeout = 60000;

/**
* Stores the SSL flag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void run() {
while (!server.serverStopRequest) {
try {
Socket socket = server.serverSocket.accept();
socket.setSoTimeout(60000);
server.executorService.execute(new DefaultHttpServerProcessingThread(server, socket));
} catch (IOException exception) {
// not interesting to do anything with this here as the client probably just hung up.
Expand Down
Loading