Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
23
-
b04
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8329487 | 21.0.4-oracle | Mimoun Ghordou | P4 | Resolved | Fixed | b02 |
JDK-8331282 | 21.0.4 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
Description
We now have createTestJavaProcessBuilder and createLimitedTestJavaProcess. The former prepends jvm options from jtreg, while the latter doesn't.
With these functions, it is common to see the following pattern in tests:
```
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(...);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
```
We have a couple of thin wrapper in ProcessTools that does exactly this, so that the code can be written as a one-liner:
```
OutputAnalyzer output = ProcessTools.executeTestJvm();
```
I propose that we name this functions using the same naming scheme we used for createTestJavaProcessBuilder and createLimitedTestJavaProcessBuilder. That is, we change executeTestJvm to executeTestJava and add a new executeLimitedTestJava function.
Attachments
Issue Links
- backported by
-
JDK-8329487 Harmonize executeTestJvm with create[Limited]TestJavaProcessBuilder
- Resolved
-
JDK-8331282 Harmonize executeTestJvm with create[Limited]TestJavaProcessBuilder
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/e7ebae54
-
Commit openjdk/jdk/cbe329b9
-
Review openjdk/jdk21u-dev/520
-
Review openjdk/jdk/17049
(1 links to)