summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgyeongseok.seo <gyeongseok.seo@samsung.com>2012-09-20 14:58:32 +0900
committergyeongseok.seo <gyeongseok.seo@samsung.com>2012-09-20 15:09:38 +0900
commit3960ef3f8c93020b74c8fa6baa7cb2b6b5f1fa65 (patch)
tree68d73d1c76a1a4cec0e3918b99791304a4010d55
parent271a52479ec57368d92101dd093c6b693e4fd8d8 (diff)
downloadcommon-eplugin-3960ef3f8c93020b74c8fa6baa7cb2b6b5f1fa65.tar.gz
common-eplugin-3960ef3f8c93020b74c8fa6baa7cb2b6b5f1fa65.tar.bz2
common-eplugin-3960ef3f8c93020b74c8fa6baa7cb2b6b5f1fa65.zip
[Title] Fixed test case - added option.
[Type] Bugfix [Module] common-eplugin [Priority] Minor [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] Change-Id: If34db070252895a7688cb69ecd8884ff0f77a6c8
-rw-r--r--org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java11
-rw-r--r--org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java4
2 files changed, 13 insertions, 2 deletions
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java
index 5efc22f53..321a8f279 100644
--- a/org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java
+++ b/org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java
@@ -44,7 +44,14 @@ import org.tizen.sdblib.MultiLineReceiver;
public class ShellSdbCommand
extends SdbDevicesHandlingCommand
{
+ /**
+ * command is performed on the select device
+ */
private String command;
+
+ /**
+ * Default timeout value
+ */
private static int DEFAULT_TIME = 90;
/**
@@ -121,6 +128,10 @@ extends SdbDevicesHandlingCommand
};
}
+ /**
+ * Run command on selected device, using SDB's device.excuteShellCommand method.
+ * if don't setting the timeout value then timeout value is set the default value.
+ */
@Override
public void run(Executor executor, ExecutionContext context)
throws Exception {
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java
index b8dcbe177..401c0f5d5 100644
--- a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java
+++ b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java
@@ -69,12 +69,12 @@ extends CommandTest
try {
testCommand.run( null, context );
assertEquals( testCommand.getCommand(), cmd );
- verify( mockDevice ).executeShellCommand( cmd, mockMultiLineReceiver );
+ verify( mockDevice ).executeShellCommand( cmd, mockMultiLineReceiver, testCommand.getTime()*1000 );
testCommand.setFilter( "filter" );
testCommand.run( null, context );
assertEquals( testCommand.getCommand(), cmd + " filter" );
- verify( mockDevice ).executeShellCommand( cmd + " filter", mockMultiLineReceiver );
+ verify( mockDevice ).executeShellCommand( cmd + " filter", mockMultiLineReceiver, testCommand.getTime()*1000 );
} catch (Exception e) {
fail( "should't throw exception" );
}