{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-dss/pulls/comments/82935319","pull_request_review_id":3807215,"id":82935319,"diff_hunk":"@@ -0,0 +1,183 @@\n+package org.wso2.dss.integration.test.jira.issues;\n+\n+import org.apache.axiom.om.OMAbstractFactory;\n+import org.apache.axiom.om.OMElement;\n+import org.apache.axiom.om.OMFactory;\n+import org.apache.axiom.om.OMNamespace;\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.testng.Assert;\n+import org.testng.annotations.AfterClass;\n+import org.testng.annotations.BeforeClass;\n+import org.testng.annotations.Test;\n+import org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException;\n+import org.wso2.carbon.automation.test.utils.axis2client.AxisServiceClient;\n+import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient;\n+import org.wso2.carbon.integration.common.utils.FileManager;\n+import org.wso2.dss.integration.common.utils.DSSTestCaseUtils;\n+import org.wso2.dss.integration.test.DSSIntegrationTest;\n+\n+import javax.activation.DataHandler;\n+import javax.xml.xpath.XPathExpressionException;\n+import java.io.File;\n+import java.io.IOException;\n+import java.util.*;\n+\n+/**\n+ * This test is to verify the fix for https://wso2.org/jira/browse/DS-1189\n+ */\n+public class DS1189LeagyTimeStampModeTestCase extends DSSIntegrationTest {\n+\n+    private static final Log log = LogFactory.getLog(DS1189LeagyTimeStampModeTestCase.class);\n+\n+    private final String serviceName = \"TimeStampDifferenceLegacy\";\n+    private String backendUrl = \"https://localhost:10653/services/\";\n+    private final OMFactory fac = OMAbstractFactory.getOMFactory();\n+    private final OMNamespace omNs = fac.createOMNamespace(\"http://ws.wso2.org/dataservice\", \"ns1\");\n+    private Map<String, String> startupParameterMap;\n+\n+    private DSSTestServerManager testServerManager;\n+    private String backupUserDir;\n+\n+    private String backupCarbonHome;\n+\n+    private AuthenticatorClient loginClient;\n+\n+    @BeforeClass(alwaysRun = true)\n+    public void serviceDeployment() throws Exception {\n+\n+        super.init();\n+\n+        startupParameterMap = new HashMap<String, String>();\n+        startupParameterMap.put(\"-DportOffset\", \"1210\");\n+\n+        testServerManager = new DSSTestServerManager(dssContext, null, startupParameterMap) {\n+\n+            public void configureServer() throws AutomationFrameworkException {\n+\n+                try {\n+                    File sourceFile = new File(getResourceLocation() + File.separator + \"serverConfigs\" + File.separator\n+                            + getParameter(\"shFilename\"));\n+\n+                    //copying wso2server.sh file to bin folder\n+                    FileManager.copyFile(sourceFile, this.getCarbonHome() + File.separator + \"bin\" + File.separator + \"wso2server.sh\");\n+\n+\n+                } catch (IOException e) {\n+                    throw new AutomationFrameworkException(e.getMessage(), e);\n+                } catch (XPathExpressionException e) {\n+                    throw new AutomationFrameworkException(e.getMessage(), e);\n+                }\n+\n+            }\n+        };\n+\n+        testServerManager.setParameter(\"shFilename\", \"wso2serverLegacyMode.sh\");\n+\n+        String testServerCarbonHome = testServerManager.startServer();\n+\n+        backupUserDir = System.getProperty(\"user.dir\");\n+        backupCarbonHome = System.getProperty(\"carbon.home\");","path":"modules/integration/tests-integration/tests/src/test/java/org/wso2/dss/integration/test/jira/issues/DS1189LeagyTimeStampModeTestCase.java","position":80,"original_position":80,"commit_id":"da344dcbc66714e04b8e501326119843c5d09369","original_commit_id":"da344dcbc66714e04b8e501326119843c5d09369","user":{"login":"lahirus","id":3665108,"avatar_url":"https://avatars.githubusercontent.com/u/3665108?v=3","gravatar_id":"","url":"https://api.github.com/users/lahirus","html_url":"https://github.com/lahirus","followers_url":"https://api.github.com/users/lahirus/followers","following_url":"https://api.github.com/users/lahirus/following{/other_user}","gists_url":"https://api.github.com/users/lahirus/gists{/gist_id}","starred_url":"https://api.github.com/users/lahirus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lahirus/subscriptions","organizations_url":"https://api.github.com/users/lahirus/orgs","repos_url":"https://api.github.com/users/lahirus/repos","events_url":"https://api.github.com/users/lahirus/events{/privacy}","received_events_url":"https://api.github.com/users/lahirus/received_events","type":"User","site_admin":false},"body":"Could we use constants here?","created_at":"2016-10-12T04:41:48Z","updated_at":"2016-10-12T04:41:48Z","html_url":"https://github.com/wso2/product-dss/pull/48#discussion_r82935319","pull_request_url":"https://api.github.com/repos/wso2/product-dss/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-dss/pulls/comments/82935319"},"html":{"href":"https://github.com/wso2/product-dss/pull/48#discussion_r82935319"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-dss/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-dss/pulls/48","id":67860811,"html_url":"https://github.com/wso2/product-dss/pull/48","diff_url":"https://github.com/wso2/product-dss/pull/48.diff","patch_url":"https://github.com/wso2/product-dss/pull/48.patch","issue_url":"https://api.github.com/repos/wso2/product-dss/issues/48","number":48,"state":"closed","locked":false,"title":"Adding Testcase for DS1189","user":{"login":"anupama-pathirage","id":16300038,"avatar_url":"https://avatars.githubusercontent.com/u/16300038?v=3","gravatar_id":"","url":"https://api.github.com/users/anupama-pathirage","html_url":"https://github.com/anupama-pathirage","followers_url":"https://api.github.com/users/anupama-pathirage/followers","following_url":"https://api.github.com/users/anupama-pathirage/following{/other_user}","gists_url":"https://api.github.com/users/anupama-pathirage/gists{/gist_id}","starred_url":"https://api.github.com/users/anupama-pathirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anupama-pathirage/subscriptions","organizations_url":"https://api.github.com/users/anupama-pathirage/orgs","repos_url":"https://api.github.com/users/anupama-pathirage/repos","events_url":"https://api.github.com/users/anupama-pathirage/events{/privacy}","received_events_url":"https://api.github.com/users/anupama-pathirage/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-26T10:21:55Z","updated_at":"2016-10-12T04:41:48Z","closed_at":"2016-04-26T10:22:17Z","merged_at":"2016-04-26T10:22:17Z","merge_commit_sha":"e054165c75419c81c454e9681bcb33f59c464aa1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-dss/pulls/48/commits","review_comments_url":"https://api.github.com/repos/wso2/product-dss/pulls/48/comments","review_comment_url":"https://api.github.com/repos/wso2/product-dss/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-dss/issues/48/comments","statuses_url":"https://api.github.com/repos/wso2/product-dss/statuses/da344dcbc66714e04b8e501326119843c5d09369","head":{"label":"anupama-pathirage:master","ref":"master","sha":"da344dcbc66714e04b8e501326119843c5d09369","user":{"login":"anupama-pathirage","id":16300038,"avatar_url":"https://avatars.githubusercontent.com/u/16300038?v=3","gravatar_id":"","url":"https://api.github.com/users/anupama-pathirage","html_url":"https://github.com/anupama-pathirage","followers_url":"https://api.github.com/users/anupama-pathirage/followers","following_url":"https://api.github.com/users/anupama-pathirage/following{/other_user}","gists_url":"https://api.github.com/users/anupama-pathirage/gists{/gist_id}","starred_url":"https://api.github.com/users/anupama-pathirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anupama-pathirage/subscriptions","organizations_url":"https://api.github.com/users/anupama-pathirage/orgs","repos_url":"https://api.github.com/users/anupama-pathirage/repos","events_url":"https://api.github.com/users/anupama-pathirage/events{/privacy}","received_events_url":"https://api.github.com/users/anupama-pathirage/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"wso2:master","ref":"master","sha":"f090cc0070c219f2543ba97506c3af0cfdf7e2ba","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":17127010,"name":"product-dss","full_name":"wso2/product-dss","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/product-dss","description":"Welcome to the WSO2 Data Services Server source code! For info on working with the WSO2 Data Services Server repository and contributing code, click the link below.","fork":false,"url":"https://api.github.com/repos/wso2/product-dss","forks_url":"https://api.github.com/repos/wso2/product-dss/forks","keys_url":"https://api.github.com/repos/wso2/product-dss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-dss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-dss/teams","hooks_url":"https://api.github.com/repos/wso2/product-dss/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-dss/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-dss/events","assignees_url":"https://api.github.com/repos/wso2/product-dss/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-dss/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-dss/tags","blobs_url":"https://api.github.com/repos/wso2/product-dss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-dss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-dss/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-dss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-dss/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-dss/languages","stargazers_url":"https://api.github.com/repos/wso2/product-dss/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-dss/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-dss/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-dss/subscription","commits_url":"https://api.github.com/repos/wso2/product-dss/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-dss/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-dss/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-dss/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-dss/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-dss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-dss/merges","archive_url":"https://api.github.com/repos/wso2/product-dss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-dss/downloads","issues_url":"https://api.github.com/repos/wso2/product-dss/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-dss/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-dss/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-dss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-dss/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-dss/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/product-dss/deployments","created_at":"2014-02-24T06:07:32Z","updated_at":"2016-07-11T04:30:50Z","pushed_at":"2016-10-06T19:01:05Z","git_url":"git://github.com/wso2/product-dss.git","ssh_url":"git@github.com:wso2/product-dss.git","clone_url":"https://github.com/wso2/product-dss.git","svn_url":"https://github.com/wso2/product-dss","homepage":"http://wso2.github.io/","size":26043,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":1,"forks":28,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-dss/pulls/48"},"html":{"href":"https://github.com/wso2/product-dss/pull/48"},"issue":{"href":"https://api.github.com/repos/wso2/product-dss/issues/48"},"comments":{"href":"https://api.github.com/repos/wso2/product-dss/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-dss/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-dss/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-dss/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-dss/statuses/da344dcbc66714e04b8e501326119843c5d09369"}}}}
{"actor":{"display_login":"lahirus"}}