With the introduction of the jwebserver tool, we will now see more and more automated tests added to test that tool. Right now to launch the jwebserver tool, the tests need to do things like:
- Find out JAVA_HOME location to get to the jwebserver tool
- Check if it's Windows or other operating system to decide whether to use .exe suffix for the tool
- Write or use existing process launching tool to launch the process
- Parse the server address of the launched jwebserver. The server address gets written out to stdout of the launched process
- Wait till the server is ready to serve the requests.
As more and more tests get added, we will end up repeating the above logic in those tests. It's better to introduce a utility in the jdk test library which hides all the above details. This utility can then be used just like other test libraries, using the "@library /test/lib" jtreg tag.
- Find out JAVA_HOME location to get to the jwebserver tool
- Check if it's Windows or other operating system to decide whether to use .exe suffix for the tool
- Write or use existing process launching tool to launch the process
- Parse the server address of the launched jwebserver. The server address gets written out to stdout of the launched process
- Wait till the server is ready to serve the requests.
As more and more tests get added, we will end up repeating the above logic in those tests. It's better to introduce a utility in the jdk test library which hides all the above details. This utility can then be used just like other test libraries, using the "@library /test/lib" jtreg tag.
- links to
-
Review openjdk/jdk/9232