Skip to content

Commit 4f8fbb4

Browse files
authored
Merge pull request #4284 from mbien/php-test-perf
improve php test performance
2 parents e174015 + 7cbddb3 commit 4f8fbb4

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@
189189
*/
190190
public abstract class CslTestBase extends NbTestCase {
191191

192+
static {
193+
// testing performance: set scanner update delay to 0
194+
System.setProperty(PathRegistry.class.getName()+".FIRER_EVT_COLLAPSE_WINDOW", "0");
195+
}
196+
192197
public CslTestBase(String testName) {
193198
super(testName);
194199
}

ide/ide.kit/nbproject/project.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ test.config.versioning.includes=\
4242
test.timeout=900000
4343
requires.nb.javac=true
4444

45-
test.run.args=-ea -Xmx700m -XX:+IgnoreUnrecognizedVMOptions \
45+
test.jms.flags=\
4646
--add-opens=java.base/java.net=ALL-UNNAMED \
4747
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED \
4848
--add-opens=java.desktop/javax.swing=ALL-UNNAMED \
4949
--add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED \
5050
--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED \
5151
--add-opens=java.desktop/sun.awt=ALL-UNNAMED \
5252
--add-modules=jdk.jdwp.agent,jdk.attach,jdk.jdi,jdk.jshell,java.compiler,jdk.compiler,jdk.management,jdk.unsupported,jdk.internal.le,jdk.internal.ed,jdk.internal.opt,jdk.internal.jvmstat \
53-
--add-exports=jdk.jdi/com.sun.jdi=ALL-UNNAMED \
53+
--add-exports=jdk.jdi/com.sun.jdi=ALL-UNNAMED

ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/PathRegistry.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@
6868
public final class PathRegistry implements Runnable {
6969

7070
private static final boolean FIRE_UNKNOWN_ALWAYS = false;
71-
/*test*/ static final int FIRER_EVT_COLLAPSE_WINDOW = 500;
71+
72+
// property set/field used in tests
73+
static final int FIRER_EVT_COLLAPSE_WINDOW = Integer.getInteger(PathRegistry.class.getName()+".FIRER_EVT_COLLAPSE_WINDOW", 500);
7274

7375
private static PathRegistry instance;
7476
private static final RequestProcessor firer = new RequestProcessor ("Path Registry Request Processor"); //NOI18N

java/java.hints/nbproject/project.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ test.config.batch2-vanilla-javac.includes=\
115115
test.config.batch2-vanilla-javac.excludes=\
116116
${vanilla-javac.excludes}
117117

118-
test.run.args=-ea -Xmx700m -XX:+IgnoreUnrecognizedVMOptions \
118+
test.jms.flags=\
119119
--add-opens=java.base/java.net=ALL-UNNAMED \
120120
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED \
121121
--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED \
122-
--add-opens=java.desktop/sun.awt=ALL-UNNAMED \
122+
--add-opens=java.desktop/sun.awt=ALL-UNNAMED

nbbuild/templates/projectized.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
<target name="test-lib-init" depends="-init-bootclasspath-prepend,init,-build-libs.junit4">
291291
<path id="test.unit.lib.cp"/>
292292
<property name="test.jms.flags" value=""/>
293-
<property name="test.run.args" value="-ea -Xmx700m ${metabuild.jms-flags.jvm} ${test.jms.flags} -XX:+IgnoreUnrecognizedVMOptions"/>
293+
<property name="test.run.args" value="-ea -Xms1200m -Xmx1200m -XX:+UseParallelGC ${metabuild.jms-flags.jvm} ${test.jms.flags} -XX:+IgnoreUnrecognizedVMOptions"/>
294294
<property name="extra.test.libs.dir" location="${test.dist.dir}/extralibs"/>
295295
<macrodef name="test-init-nborg">
296296
<attribute name="test.type"/>

0 commit comments

Comments
 (0)