@@ -121,34 +121,23 @@ static void test(boolean dumpWithParallel, boolean execWithParallel, boolean use
121121 out .shouldNotContain (errMsg );
122122 out .shouldHaveExitValue (0 );
123123
124- int n = 2 ;
125124 if (!dumpWithParallel && execWithParallel ) {
126125 // We dumped with G1, so we have an archived heap. At exec time, try to load them into
127126 // a small ParallelGC heap that may be too small.
128- String [] sizes = {
129- "4m" , // usually this will success load the archived heap
130- "2m" , // usually this will fail to load the archived heap, but app can launch
131- // or fail with "GC triggered before VM initialization completed"
132- "1m" // usually this will cause VM launch to fail with "Too small maximum heap"
133- };
134- for (String sz : sizes ) {
135- String xmx = "-Xmx" + sz ;
136- System .out .println ("=======\n " + n + ". Exec with " + execGC + " " + xmx );
137- out = TestCommon .exec (helloJar ,
138- execGC ,
139- small1 ,
140- small2 ,
141- xmx ,
142- coops ,
143- "-Xlog:cds" ,
144- "Hello" );
145- if (out .getExitValue () == 0 ) {
146- out .shouldContain (HELLO );
147- out .shouldNotContain (errMsg );
148- } else {
149- out .shouldNotHaveFatalError ();
150- }
151- n ++;
127+ System .out .println ("2. Exec with " + execGC );
128+ out = TestCommon .exec (helloJar ,
129+ execGC ,
130+ small1 ,
131+ small2 ,
132+ "-Xmx4m" ,
133+ coops ,
134+ "-Xlog:cds" ,
135+ "Hello" );
136+ if (out .getExitValue () == 0 ) {
137+ out .shouldContain (HELLO );
138+ out .shouldNotContain (errMsg );
139+ } else {
140+ out .shouldNotHaveFatalError ();
152141 }
153142 }
154143 }
0 commit comments