{"action":"created","comment":{"url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments/32273572","id":32273572,"diff_hunk":"@@ -0,0 +1,137 @@\n+/*\n+ * JBoss, Home of Professional Open Source.\n+ * Copyright ${year}, Red Hat, Inc., and individual contributors\n+ * as indicated by the @author tags. See the copyright.txt file in the\n+ * distribution for a full listing of individual contributors.\n+ *\n+ * This is free software; you can redistribute it and/or modify it\n+ * under the terms of the GNU Lesser General Public License as\n+ * published by the Free Software Foundation; either version 2.1 of\n+ * the License, or (at your option) any later version.\n+ *\n+ * This software is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this software; if not, write to the Free\n+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n+ */\n+package org.wildfly.client.old.server;\n+\n+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEPLOYMENT;\n+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.FAILED;\n+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OUTCOME;\n+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.PRODUCT_VERSION;\n+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.READ_RESOURCE_OPERATION;\n+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.RELEASE_VERSION;\n+\n+import java.io.InputStream;\n+import java.util.List;\n+import java.util.concurrent.ExecutionException;\n+import java.util.concurrent.Future;\n+import java.util.concurrent.TimeUnit;\n+import java.util.concurrent.TimeoutException;\n+\n+import javax.inject.Inject;\n+\n+import org.jboss.as.controller.PathAddress;\n+import org.jboss.as.controller.client.ModelControllerClient;\n+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;\n+import org.jboss.as.controller.operations.common.Util;\n+import org.jboss.as.test.shared.TimeoutUtil;\n+import org.jboss.dmr.ModelNode;\n+import org.junit.Assert;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.wildfly.client.old.server.util.LargeDeploymentFile;\n+import org.wildfly.client.old.server.util.OldVersionTestParameter;\n+import org.wildfly.client.old.server.util.OldVersionTestRunner;\n+import org.wildfly.client.old.server.util.Version;\n+import org.wildfly.core.testrunner.ManagementClient;\n+\n+\n+/**\n+ * The OldVersionTestRunner generates the file, and its size is controlled by -Djboss.test.client.old.server.size={@code <bytes>}.\n+ * The default is 1GB.\n+ *\n+ * @author Kabir Khan\n+ */\n+@RunWith(OldVersionTestRunner.class)\n+public class ClientAgainstOldServerTestCase {\n+\n+    // Max time to wait for some action to complete, in s\n+    private static final int TIMEOUT = TimeoutUtil.adjust(120);\n+\n+    private final Version.AsVersion version;\n+\n+    @Inject\n+    protected ManagementClient managementClient;\n+\n+    @Inject\n+    protected LargeDeploymentFile testDeploymentFile;\n+\n+    public ClientAgainstOldServerTestCase(OldVersionTestParameter param) {\n+        this.version = param.getAsVersion();\n+    }\n+\n+    @OldVersionTestRunner.OldVersionParameter\n+    public static List<OldVersionTestParameter> parameters(){\n+        return OldVersionTestParameter.setupVersions();\n+    }\n+\n+    @Test\n+    public void testVersion() throws Exception {\n+        checkVersion();\n+    }\n+\n+    @Test\n+    public void testDeployment() throws Exception {\n+        final ModelControllerClient client = managementClient.getControllerClient();\n+        final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);\n+\n+        //Deploy\n+        try (final InputStream is = testDeploymentFile.getInputStream()){\n+            Future<?> future = manager.execute(\n+                    manager.newDeploymentPlan().add(testDeploymentFile.getName(), is).deploy(testDeploymentFile.getName()).build());","path":"testsuite/client-old-server/src/test/java/org/wildfly/client/old/server/ClientAgainstOldServerTestCase.java","position":98,"original_position":98,"commit_id":"a9e61ccadd4d1b8f624c5ecc298ac6fbf8f20c56","original_commit_id":"a9e61ccadd4d1b8f624c5ecc298ac6fbf8f20c56","user":{"login":"bstansberry","id":299242,"avatar_url":"https://avatars.githubusercontent.com/u/299242?v=3","gravatar_id":"","url":"https://api.github.com/users/bstansberry","html_url":"https://github.com/bstansberry","followers_url":"https://api.github.com/users/bstansberry/followers","following_url":"https://api.github.com/users/bstansberry/following{/other_user}","gists_url":"https://api.github.com/users/bstansberry/gists{/gist_id}","starred_url":"https://api.github.com/users/bstansberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bstansberry/subscriptions","organizations_url":"https://api.github.com/users/bstansberry/orgs","repos_url":"https://api.github.com/users/bstansberry/repos","events_url":"https://api.github.com/users/bstansberry/events{/privacy}","received_events_url":"https://api.github.com/users/bstansberry/received_events","type":"User","site_admin":false},"body":"Just removing the \".deploy(testDeploymentFile.getName())\" should eliminate the DUPs from the test.","created_at":"2015-06-11T22:04:42Z","updated_at":"2015-06-11T22:04:42Z","html_url":"https://github.com/wildfly/wildfly-core/pull/804#discussion_r32273572","pull_request_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804","_links":{"self":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments/32273572"},"html":{"href":"https://github.com/wildfly/wildfly-core/pull/804#discussion_r32273572"},"pull_request":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804"}}},"pull_request":{"url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804","id":37443852,"html_url":"https://github.com/wildfly/wildfly-core/pull/804","diff_url":"https://github.com/wildfly/wildfly-core/pull/804.diff","patch_url":"https://github.com/wildfly/wildfly-core/pull/804.patch","issue_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/804","number":804,"state":"open","locked":false,"title":"Get framework set up for testing the current client against old versions","user":{"login":"kabir","id":49927,"avatar_url":"https://avatars.githubusercontent.com/u/49927?v=3","gravatar_id":"","url":"https://api.github.com/users/kabir","html_url":"https://github.com/kabir","followers_url":"https://api.github.com/users/kabir/followers","following_url":"https://api.github.com/users/kabir/following{/other_user}","gists_url":"https://api.github.com/users/kabir/gists{/gist_id}","starred_url":"https://api.github.com/users/kabir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabir/subscriptions","organizations_url":"https://api.github.com/users/kabir/orgs","repos_url":"https://api.github.com/users/kabir/repos","events_url":"https://api.github.com/users/kabir/events{/privacy}","received_events_url":"https://api.github.com/users/kabir/received_events","type":"User","site_admin":false},"body":"Refactor the Server in test-runner to not use static fields, so that we\r\ncan change the values.\r\n\r\nAs mentioned in my comment https://issues.jboss.org/browse/JBIDE-19641?focusedCommentId=13077135&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13077135 this needs some setup:\r\n-Djboss.test.client.old.server.dir=<path-to-dir-containing zips> \r\n-Djboss.test.client.old.server.jdk7=%env.JDK_17%\r\n\r\nTeamCity currently only has the EAP zips, so I want to merge this first and to explore what JVM options are needed before uploading all the other versions. We probably don't want this as part of normal PR/master-ignore etc. runs, so I will create a custom job (similar to the mixed domain job) and see where that gets me.\r\n\r\n\r\n\r\n","created_at":"2015-06-11T09:22:29Z","updated_at":"2015-06-11T22:04:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72f7733640d5742e240e579da0c45a2bd77ee210","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804/commits","review_comments_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804/comments","review_comment_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/804/comments","statuses_url":"https://api.github.com/repos/wildfly/wildfly-core/statuses/a9e61ccadd4d1b8f624c5ecc298ac6fbf8f20c56","head":{"label":"kabir:client-old-server","ref":"client-old-server","sha":"a9e61ccadd4d1b8f624c5ecc298ac6fbf8f20c56","user":{"login":"kabir","id":49927,"avatar_url":"https://avatars.githubusercontent.com/u/49927?v=3","gravatar_id":"","url":"https://api.github.com/users/kabir","html_url":"https://github.com/kabir","followers_url":"https://api.github.com/users/kabir/followers","following_url":"https://api.github.com/users/kabir/following{/other_user}","gists_url":"https://api.github.com/users/kabir/gists{/gist_id}","starred_url":"https://api.github.com/users/kabir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabir/subscriptions","organizations_url":"https://api.github.com/users/kabir/orgs","repos_url":"https://api.github.com/users/kabir/repos","events_url":"https://api.github.com/users/kabir/events{/privacy}","received_events_url":"https://api.github.com/users/kabir/received_events","type":"User","site_admin":false},"repo":{"id":21432484,"name":"wildfly-core","full_name":"kabir/wildfly-core","owner":{"login":"kabir","id":49927,"avatar_url":"https://avatars.githubusercontent.com/u/49927?v=3","gravatar_id":"","url":"https://api.github.com/users/kabir","html_url":"https://github.com/kabir","followers_url":"https://api.github.com/users/kabir/followers","following_url":"https://api.github.com/users/kabir/following{/other_user}","gists_url":"https://api.github.com/users/kabir/gists{/gist_id}","starred_url":"https://api.github.com/users/kabir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabir/subscriptions","organizations_url":"https://api.github.com/users/kabir/orgs","repos_url":"https://api.github.com/users/kabir/repos","events_url":"https://api.github.com/users/kabir/events{/privacy}","received_events_url":"https://api.github.com/users/kabir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kabir/wildfly-core","description":"The core runtime that is used by the Wildfly application server","fork":true,"url":"https://api.github.com/repos/kabir/wildfly-core","forks_url":"https://api.github.com/repos/kabir/wildfly-core/forks","keys_url":"https://api.github.com/repos/kabir/wildfly-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kabir/wildfly-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kabir/wildfly-core/teams","hooks_url":"https://api.github.com/repos/kabir/wildfly-core/hooks","issue_events_url":"https://api.github.com/repos/kabir/wildfly-core/issues/events{/number}","events_url":"https://api.github.com/repos/kabir/wildfly-core/events","assignees_url":"https://api.github.com/repos/kabir/wildfly-core/assignees{/user}","branches_url":"https://api.github.com/repos/kabir/wildfly-core/branches{/branch}","tags_url":"https://api.github.com/repos/kabir/wildfly-core/tags","blobs_url":"https://api.github.com/repos/kabir/wildfly-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kabir/wildfly-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kabir/wildfly-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/kabir/wildfly-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kabir/wildfly-core/statuses/{sha}","languages_url":"https://api.github.com/repos/kabir/wildfly-core/languages","stargazers_url":"https://api.github.com/repos/kabir/wildfly-core/stargazers","contributors_url":"https://api.github.com/repos/kabir/wildfly-core/contributors","subscribers_url":"https://api.github.com/repos/kabir/wildfly-core/subscribers","subscription_url":"https://api.github.com/repos/kabir/wildfly-core/subscription","commits_url":"https://api.github.com/repos/kabir/wildfly-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/kabir/wildfly-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/kabir/wildfly-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/kabir/wildfly-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/kabir/wildfly-core/contents/{+path}","compare_url":"https://api.github.com/repos/kabir/wildfly-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kabir/wildfly-core/merges","archive_url":"https://api.github.com/repos/kabir/wildfly-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kabir/wildfly-core/downloads","issues_url":"https://api.github.com/repos/kabir/wildfly-core/issues{/number}","pulls_url":"https://api.github.com/repos/kabir/wildfly-core/pulls{/number}","milestones_url":"https://api.github.com/repos/kabir/wildfly-core/milestones{/number}","notifications_url":"https://api.github.com/repos/kabir/wildfly-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kabir/wildfly-core/labels{/name}","releases_url":"https://api.github.com/repos/kabir/wildfly-core/releases{/id}","created_at":"2014-07-02T17:03:20Z","updated_at":"2015-04-27T22:05:07Z","pushed_at":"2015-06-11T09:50:41Z","git_url":"git://github.com/kabir/wildfly-core.git","ssh_url":"git@github.com:kabir/wildfly-core.git","clone_url":"https://github.com/kabir/wildfly-core.git","svn_url":"https://github.com/kabir/wildfly-core","homepage":null,"size":41253,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wildfly:master","ref":"master","sha":"e7ebed9d2170406dc7d45a36f0cc0843a7362091","user":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"repo":{"id":21394954,"name":"wildfly-core","full_name":"wildfly/wildfly-core","owner":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wildfly/wildfly-core","description":"The core runtime that is used by the Wildfly application server","fork":false,"url":"https://api.github.com/repos/wildfly/wildfly-core","forks_url":"https://api.github.com/repos/wildfly/wildfly-core/forks","keys_url":"https://api.github.com/repos/wildfly/wildfly-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wildfly/wildfly-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wildfly/wildfly-core/teams","hooks_url":"https://api.github.com/repos/wildfly/wildfly-core/hooks","issue_events_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/events{/number}","events_url":"https://api.github.com/repos/wildfly/wildfly-core/events","assignees_url":"https://api.github.com/repos/wildfly/wildfly-core/assignees{/user}","branches_url":"https://api.github.com/repos/wildfly/wildfly-core/branches{/branch}","tags_url":"https://api.github.com/repos/wildfly/wildfly-core/tags","blobs_url":"https://api.github.com/repos/wildfly/wildfly-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wildfly/wildfly-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wildfly/wildfly-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/wildfly/wildfly-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wildfly/wildfly-core/statuses/{sha}","languages_url":"https://api.github.com/repos/wildfly/wildfly-core/languages","stargazers_url":"https://api.github.com/repos/wildfly/wildfly-core/stargazers","contributors_url":"https://api.github.com/repos/wildfly/wildfly-core/contributors","subscribers_url":"https://api.github.com/repos/wildfly/wildfly-core/subscribers","subscription_url":"https://api.github.com/repos/wildfly/wildfly-core/subscription","commits_url":"https://api.github.com/repos/wildfly/wildfly-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/wildfly/wildfly-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/wildfly/wildfly-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/wildfly/wildfly-core/contents/{+path}","compare_url":"https://api.github.com/repos/wildfly/wildfly-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wildfly/wildfly-core/merges","archive_url":"https://api.github.com/repos/wildfly/wildfly-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wildfly/wildfly-core/downloads","issues_url":"https://api.github.com/repos/wildfly/wildfly-core/issues{/number}","pulls_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls{/number}","milestones_url":"https://api.github.com/repos/wildfly/wildfly-core/milestones{/number}","notifications_url":"https://api.github.com/repos/wildfly/wildfly-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wildfly/wildfly-core/labels{/name}","releases_url":"https://api.github.com/repos/wildfly/wildfly-core/releases{/id}","created_at":"2014-07-01T16:33:34Z","updated_at":"2015-06-01T15:10:51Z","pushed_at":"2015-06-11T21:59:06Z","git_url":"git://github.com/wildfly/wildfly-core.git","ssh_url":"git@github.com:wildfly/wildfly-core.git","clone_url":"https://github.com/wildfly/wildfly-core.git","svn_url":"https://github.com/wildfly/wildfly-core","homepage":null,"size":47241,"stargazers_count":22,"watchers_count":22,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":20,"forks":135,"open_issues":20,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804"},"html":{"href":"https://github.com/wildfly/wildfly-core/pull/804"},"issue":{"href":"https://api.github.com/repos/wildfly/wildfly-core/issues/804"},"comments":{"href":"https://api.github.com/repos/wildfly/wildfly-core/issues/804/comments"},"review_comments":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804/comments"},"review_comment":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/804/commits"},"statuses":{"href":"https://api.github.com/repos/wildfly/wildfly-core/statuses/a9e61ccadd4d1b8f624c5ecc298ac6fbf8f20c56"}}}}