< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/LambdaEagerInit.java

Print this page

113             .addPrefix("-cp", appJar, testProperty,  "-Xlog:class+load,cds=debug")
114             .setUseSystemArchive(true)
115             .setUseVersion(false)
116             .addSuffix(mainClass);
117         OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
118         output.shouldMatch(lambdaNotLoadedFromArchive)
119               .shouldNotMatch(cdsLoadedLambdaProxy)
120               .shouldHaveExitValue(0);
121     }
122 
123     static void testDefaultArchiveWithEagerInitializationDisabled() throws Exception {
124         // run with default CDS archive without the -Djdk.internal.lambda.disableEagerInitialization=true property
125         CDSOptions runOpts = (new CDSOptions())
126             .setXShareMode("auto")
127             .addPrefix("-cp", appJar, "-Xlog:class+load,cds=debug")
128             .setUseSystemArchive(true)
129             .setUseVersion(false)
130             .addSuffix("-showversion", mainClass);
131         OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
132         if (output.getStderr().contains("sharing")) {
133             output.shouldMatch(lambdaLoadedFromArchive)
134                   .shouldMatch(cdsLoadedLambdaProxy);

135         }
136         output.shouldHaveExitValue(0);
137     }
138 }

113             .addPrefix("-cp", appJar, testProperty,  "-Xlog:class+load,cds=debug")
114             .setUseSystemArchive(true)
115             .setUseVersion(false)
116             .addSuffix(mainClass);
117         OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
118         output.shouldMatch(lambdaNotLoadedFromArchive)
119               .shouldNotMatch(cdsLoadedLambdaProxy)
120               .shouldHaveExitValue(0);
121     }
122 
123     static void testDefaultArchiveWithEagerInitializationDisabled() throws Exception {
124         // run with default CDS archive without the -Djdk.internal.lambda.disableEagerInitialization=true property
125         CDSOptions runOpts = (new CDSOptions())
126             .setXShareMode("auto")
127             .addPrefix("-cp", appJar, "-Xlog:class+load,cds=debug")
128             .setUseSystemArchive(true)
129             .setUseVersion(false)
130             .addSuffix("-showversion", mainClass);
131         OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
132         if (output.getStderr().contains("sharing")) {
133           // FIXME:leyden-premain : we disabled archived Lambda proxy classes due to JDK-8307468
134           // output.shouldMatch(lambdaLoadedFromArchive)
135           //        .shouldMatch(cdsLoadedLambdaProxy);
136         }
137         output.shouldHaveExitValue(0);
138     }
139 }
< prev index next >