[smart-load-test commit] r155 - trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loa...

1 view
Skip to first unread message

codesite...@google.com

unread,
Oct 29, 2008, 8:06:11 AM10/29/08
to smart-loa...@smartitengineering.com
Author: imyousuf
Date: Wed Oct 29 04:05:51 2008
New Revision: 155

Modified:

trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/DummyTestCase.java

trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/LoadTestEngineImplTest.java

Log:
Fix sleep setting in dummy test case

Test case for the fix is added to the engine test to ensure that it does
not break in future.

Signed-off-by: Imran M Yousuf <imyo...@smartitengineering.com>

Modified:
trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/DummyTestCase.java
==============================================================================
---
trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/DummyTestCase.java
(original)
+++
trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/DummyTestCase.java
Wed Oct 29 04:05:51 2008
@@ -39,7 +39,7 @@
}

public DummyTestCase(Properties properties) {
- if(properties != null && properties.contains(SLEEP_TIME_PROP)) {
+ if(properties != null && properties.containsKey(SLEEP_TIME_PROP)) {
String time = properties.getProperty(SLEEP_TIME_PROP);
try {
sleepTime = Integer.parseInt(time);

Modified:
trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/LoadTestEngineImplTest.java
==============================================================================
---
trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/LoadTestEngineImplTest.java
(original)
+++
trunk/smart-load-test/smart-load-test-engine-impl/src/test/java/com/smartitengineering/loadtest/engine/impl/LoadTestEngineImplTest.java
Wed Oct 29 04:05:51 2008
@@ -409,6 +409,10 @@
instanceResult.getInstanceNumber());
if (validationResult) {

numbers.add(instanceResult.getInstanceNumber());
+ long duration =
instanceResult.getEndTime().getTime()
+ - instanceResult.getStartTime().getTime();
+ validationResult = validationResult
+ && duration >= instanceData.sleepDuration;
}
else {
break;

Reply all
Reply to author
Forward
0 new messages