aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Laakso <jani.laakso@itmill.com>2007-10-04 16:34:35 +0000
committerJani Laakso <jani.laakso@itmill.com>2007-10-04 16:34:35 +0000
commitebed47a6b095c77f033a71ec87114040bccbbf07 (patch)
tree5afc35944445c06ccd158c6c34fa7904c84fe3c1
parentdc08d70ab305ac1491d351bc44ed139f71f292d5 (diff)
downloadvaadin-framework-ebed47a6b095c77f033a71ec87114040bccbbf07.tar.gz
vaadin-framework-ebed47a6b095c77f033a71ec87114040bccbbf07.zip
Made test component count considerable smaller.
svn changeset:2437/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/tests/RandomLayoutStress.java21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/com/itmill/toolkit/tests/RandomLayoutStress.java b/src/com/itmill/toolkit/tests/RandomLayoutStress.java
index b722df13d2..3218c7e25c 100644
--- a/src/com/itmill/toolkit/tests/RandomLayoutStress.java
+++ b/src/com/itmill/toolkit/tests/RandomLayoutStress.java
@@ -16,6 +16,13 @@ public class RandomLayoutStress extends com.itmill.toolkit.Application {
private Random seededRandom = new Random(1);
+ // FIXME increasing these settings brings out interesting client-side issues (DOM errors)
+ // TODO increasing values "even more" crashes Hosted Mode, pumping Xmx/Xms helps to some extent
+ private static final int componentCountA = 5;
+ private static final int componentCountB = 5;
+ private static final int componentCountC = 10;
+ private static final int componentCountD = 5;
+
/**
* Initialize Application. Demo components are added to main window.
*/
@@ -31,7 +38,7 @@ public class RandomLayoutStress extends com.itmill.toolkit.Application {
OrderedLayout layoutA = new OrderedLayout(
OrderedLayout.ORIENTATION_HORIZONTAL);
// Add 4 random components
- fillLayout(layoutA, 50);
+ fillLayout(layoutA, componentCountA);
// Add layout to panel
panelA.addComponent(layoutA);
@@ -40,15 +47,17 @@ public class RandomLayoutStress extends com.itmill.toolkit.Application {
OrderedLayout layoutB = new OrderedLayout(
OrderedLayout.ORIENTATION_VERTICAL);
// Add 4 random components
- fillLayout(layoutB, 50);
+ fillLayout(layoutB, componentCountB);
// Add layout to panel
panelB.addComponent(layoutB);
// Create grid layout
- Panel panelG = new Panel("Panel containing grid layout (20 x 20)");
- GridLayout layoutG = new GridLayout(20, 20);
+ int gridSize = (int) java.lang.Math.sqrt(componentCountC);
+ Panel panelG = new Panel("Panel containing grid layout (" + gridSize
+ + " x " + gridSize + ")");
+ GridLayout layoutG = new GridLayout(gridSize, gridSize);
// Add 12 random components
- fillLayout(layoutG, 200);
+ fillLayout(layoutG, componentCountC);
// Add layout to panel
panelG.addComponent(layoutG);
@@ -64,7 +73,7 @@ public class RandomLayoutStress extends com.itmill.toolkit.Application {
Panel panelC = new Panel("Custom layout with style exampleStyle");
CustomLayout layoutC = new CustomLayout("exampleStyle");
// Add 4 random components
- fillLayout(layoutC, 50);
+ fillLayout(layoutC, componentCountD);
// Add layout to panel
panelC.addComponent(layoutC);