Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8282036

Change java/util/zip/ZipFile/DeleteTempJar.java to stop HttpServer cleanly in case of exceptions

XMLWordPrintable

        The testfile java/util/zip/ZipFile/DeleteTempJar.java has the following syntax:

        HttpServer server = //create server;
        server.start();
        try {
          //the test
          server.stop();
        } catch (Throwable) {
          //fail
        }

        The server.stop() does not get executed in case of encountering a failure. As a result, the test may get hung until a timeout. It should be easy enough to update the test to close the server in failure scenario too.

              tvoniadka Thejasvi Voniadka (Inactive)
              tvoniadka Thejasvi Voniadka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: