[overlord-commits] Overlord SVN: r149 - in sam/trunk: src/test/java/org/jboss/test/sam/samples/pattern and 1 other directory.
overlord-commits at lists.jboss.org
overlord-commits at lists.jboss.org
Sun Jul 13 11:05:17 EDT 2008
Author: heiko.braun at jboss.com
Date: 2008-07-13 11:05:16 -0400 (Sun, 13 Jul 2008)
New Revision: 149
Added:
sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java
Removed:
sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java
Modified:
sam/trunk/SAM.iws
sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java
Log:
Cleanup test cases
Modified: sam/trunk/SAM.iws
===================================================================
--- sam/trunk/SAM.iws 2008-07-13 12:36:46 UTC (rev 148)
+++ sam/trunk/SAM.iws 2008-07-13 15:05:16 UTC (rev 149)
@@ -21,22 +21,17 @@
<list default="true" name="Default" comment="">
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/internal/SimulationProcessList.java" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/internal/SimulationProcessList.java" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/Scheduler.java" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/Scheduler.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Histogram.java" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Histogram.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/OrderEventMessage.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java" afterPath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java" />
<change type="NEW" beforePath="" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/util" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/SimpleHistogram.java" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/SimpleHistogram.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" />
<change type="NEW" beforePath="" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/util/ThreadUtil.java" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/pom.xml" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/pom.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAM.iws" afterPath="$PROJECT_DIR$/SAM.iws" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Variance.java" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Variance.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/resources/samples/esper-default-cfg.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/esper/EventAdapter.java" afterPath="$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/esper/EventAdapter.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Mean.java" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Mean.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java" afterPath="" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.java" afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.java" />
</list>
</component>
@@ -179,10 +174,10 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="AggregationTestCase.java" pinned="false" current="true" current-in-tab="true">
+ <file leaf-file-name="AggregationTestCase.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="42" column="70" selection-start="1620" selection-end="1620" vertical-scroll-proportion="-1.8419783">
+ <state line="145" column="27" selection-start="4634" selection-end="4634" vertical-scroll-proportion="2.5054283">
<folding>
<element signature="imports" expanded="true" />
</folding>
@@ -190,6 +185,24 @@
</provider>
</entry>
</file>
+ <file leaf-file-name="LightSwitchEventMessage.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="26" column="27" selection-start="1159" selection-end="1159" vertical-scroll-proportion="0.13751508">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="PatternTestCase.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="171" column="99" selection-start="5479" selection-end="5479" vertical-scroll-proportion="0.6830467">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
<file leaf-file-name="EventAdapter.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/esper/EventAdapter.java">
<provider selected="true" editor-type-id="text-editor">
@@ -1334,7 +1347,7 @@
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="while(!terminate())" />
+ <option name="LAST_COMMIT_MESSAGE" value="Cleanup aggregation sample" />
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
@@ -1351,6 +1364,7 @@
<MESSAGE value="Added ratio constraint assertion" />
<MESSAGE value="javadocs" />
<MESSAGE value="while(!terminate())" />
+ <MESSAGE value="Cleanup aggregation sample" />
</component>
<component name="VssConfiguration">
<option name="CLIENT_PATH" value="" />
@@ -1404,13 +1418,6 @@
<option name="myLastEditedConfigurable" value="IDE Profiles" />
</component>
<component name="editorHistoryManager">
- <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/Scheduler.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="240" column="15" selection-start="6550" selection-end="6550" vertical-scroll-proportion="0.54829544">
- <folding />
- </state>
- </provider>
- </entry>
<entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/PrecisionHistogram.java">
<provider selected="true" editor-type-id="text-editor">
<state line="243" column="12" selection-start="6168" selection-end="6168" vertical-scroll-proportion="0.1570248">
@@ -1453,13 +1460,6 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="66" column="24" selection-start="2151" selection-end="2151" vertical-scroll-proportion="0.93149036">
- <folding />
- </state>
- </provider>
- </entry>
<entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
<provider selected="true" editor-type-id="text-editor">
<state line="54" column="34" selection-start="2039" selection-end="2039" vertical-scroll-proportion="0.76269186">
@@ -1506,13 +1506,27 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="42" column="70" selection-start="1620" selection-end="1620" vertical-scroll-proportion="-1.8419783">
+ <state line="145" column="27" selection-start="4634" selection-end="4634" vertical-scroll-proportion="2.5054283">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="26" column="27" selection-start="1159" selection-end="1159" vertical-scroll-proportion="0.13751508">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="171" column="99" selection-start="5479" selection-end="5479" vertical-scroll-proportion="0.6830467">
+ <folding />
+ </state>
+ </provider>
+ </entry>
</component>
</project>
Deleted: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java
===================================================================
--- sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java 2008-07-13 12:36:46 UTC (rev 148)
+++ sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java 2008-07-13 15:05:16 UTC (rev 149)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.sam.samples.pattern;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public final class LightSwitch
-{
- boolean enabled;
-
- public LightSwitch(boolean enabled)
- {
- this.enabled = enabled;
- }
-
- public boolean getEnabled()
- {
- return enabled;
- }
-
-
- public String toString()
- {
- return "LightSwitch{enabled="+this.enabled+"}";
- }
-}
Copied: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java (from rev 143, sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java)
===================================================================
--- sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java (rev 0)
+++ sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java 2008-07-13 15:05:16 UTC (rev 149)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.sam.samples.pattern;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public final class LightSwitchEventMessage
+{
+ boolean enabled;
+
+ public LightSwitchEventMessage(boolean enabled)
+ {
+ this.enabled = enabled;
+ }
+
+ public boolean getEnabled()
+ {
+ return enabled;
+ }
+
+
+ public String toString()
+ {
+ return "LightSwitch{enabled="+this.enabled+"}";
+ }
+}
Property changes on: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java
===================================================================
--- sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java 2008-07-13 12:36:46 UTC (rev 148)
+++ sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java 2008-07-13 15:05:16 UTC (rev 149)
@@ -78,7 +78,7 @@
public Object createEventMessage(SimulationContext context)
{
context.getMeasurement("dispatched").increment();
- LightSwitch message = new LightSwitch(lastState);
+ LightSwitchEventMessage message = new LightSwitchEventMessage(lastState);
lastState = !lastState;
return message;
}
@@ -101,7 +101,7 @@
simulation.addSink(sink);
// forward single event messages
- simulation.bindStatement("select B.* from pattern [every (A=LightSwitch(enabled=true) -> B=LightSwitch(enabled=false))]", sink);
+ simulation.bindStatement("select B.* from pattern [every (A=LightSwitchEventMessage(enabled=true) -> B=LightSwitchEventMessage(enabled=false))]", sink);
// start simulation
simulation.singleRun();
@@ -131,18 +131,18 @@
public Object createEventMessage(SimulationContext context)
{
- LightSwitch message = null;
+ LightSwitchEventMessage message = null;
double d = context.getMeasurement("dispatched").getCurrent();
if(d!=3)
{
// create a regular light switch condition
- message = new LightSwitch(lastState);
+ message = new LightSwitchEventMessage(lastState);
}
else
{
// create an error condition: two times same enabled value
- message = new LightSwitch(!lastState);
+ message = new LightSwitchEventMessage(!lastState);
}
lastState = !lastState;
@@ -169,7 +169,7 @@
// forward single event messages
simulation.bindStatement("select A.enabled as firstEnabled, B.enabled as secondEnabled "+
- "from pattern [every (A=LightSwitch(enabled=false) -> B=LightSwitch(enabled=false))]", sink);
+ "from pattern [every (A=LightSwitchEventMessage(enabled=false) -> B=LightSwitchEventMessage(enabled=false))]", sink);
// start simulation
simulation.singleRun();
More information about the overlord-commits
mailing list