aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-05-29 14:11:28 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-05-29 14:11:28 +0000
commit0e99ee6a24abb693fc1ed721d50fb973830e0146 (patch)
tree7a080dcf61e1d6aae23ada532fba4051c86168d9
parent4effe1e9e6a0e07bd1c4a9488879951af5871c96 (diff)
downloadvaadin-framework-0e99ee6a24abb693fc1ed721d50fb973830e0146.tar.gz
vaadin-framework-0e99ee6a24abb693fc1ed721d50fb973830e0146.zip
fixed test still. Now does not depend on how many times application run on same servlet container
svn changeset:4706/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/automatedtests/ComponentsInTable.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java b/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java
index 8345cae8e9..1aabdfea71 100644
--- a/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java
+++ b/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java
@@ -16,8 +16,6 @@ import com.itmill.toolkit.ui.Button.ClickEvent;
public class ComponentsInTable extends CustomComponent {
- static final Random rnd = new Random(1);
-
public ComponentsInTable(int cols, int rows) {
final OrderedLayout main = new OrderedLayout();
setCompositionRoot(main);
@@ -26,6 +24,8 @@ public class ComponentsInTable extends CustomComponent {
}
public static Table getTestTable(int cols, int rows) {
+ Random rnd = new Random(1);
+
final Table t = new Table();
t.setColumnCollapsingAllowed(true);
for (int i = 0; i < cols; i++) {
@@ -35,7 +35,7 @@ public class ComponentsInTable extends CustomComponent {
for (int i = 0; i < rows; i++) {
final Vector content = new Vector();
for (int j = 0; j < cols; j++) {
- content.add(rndString());
+ content.add(rndString(rnd));
}
content.add(new Button("b" + i, new Button.ClickListener() {
@@ -70,7 +70,7 @@ public class ComponentsInTable extends CustomComponent {
"Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin",
"Cody", "Alejandro", "Caden", "Blake", "Carson" };
- public static String rndString() {
+ public static String rndString(Random rnd) {
return testString[(int) (rnd.nextDouble() * testString.length)];
}