{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/65","repository_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness","labels_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/65/comments","events_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/65/events","html_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/65","id":119736443,"number":65,"title":"[JENKINS-31772] Allow JenkinsAcceptanceTestRule to be used as a ClassRule.","user":{"login":"andresrc","id":500424,"avatar_url":"https://avatars.githubusercontent.com/u/500424?v=3","gravatar_id":"","url":"https://api.github.com/users/andresrc","html_url":"https://github.com/andresrc","followers_url":"https://api.github.com/users/andresrc/followers","following_url":"https://api.github.com/users/andresrc/following{/other_user}","gists_url":"https://api.github.com/users/andresrc/gists{/gist_id}","starred_url":"https://api.github.com/users/andresrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresrc/subscriptions","organizations_url":"https://api.github.com/users/andresrc/orgs","repos_url":"https://api.github.com/users/andresrc/repos","events_url":"https://api.github.com/users/andresrc/events{/privacy}","received_events_url":"https://api.github.com/users/andresrc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-12-01T15:09:02Z","updated_at":"2016-04-13T07:27:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/pulls/65","html_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/65","diff_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/65.diff","patch_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/65.patch"},"body":"[[JENKINS-31772]](https://issues.jenkins-ci.org/browse/JENKINS-31772)\r\n\r\nAdd support to using JenkinsAcceptanceTestRule as a ClassRule. PR scope:\r\n- [x] Change JenkinsAcceptanceTestRule to be a TestRule instead of MethodRule.\r\n- [x] Add support to use the rule as a ClassRule.\r\n- [x] Adapt the FolderPluginTest to use the ClassRule.\r\n- [x] A rule to detect method annotations on classes using class rule.\r\n- [x] Additional comments on expected uses of ClassRule\r\n\r\n@reviewbybees \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/comments/209272780","html_url":"https://github.com/jenkinsci/acceptance-test-harness/pull/65#issuecomment-209272780","issue_url":"https://api.github.com/repos/jenkinsci/acceptance-test-harness/issues/65","id":209272780,"user":{"login":"olivergondza","id":206841,"avatar_url":"https://avatars.githubusercontent.com/u/206841?v=3","gravatar_id":"","url":"https://api.github.com/users/olivergondza","html_url":"https://github.com/olivergondza","followers_url":"https://api.github.com/users/olivergondza/followers","following_url":"https://api.github.com/users/olivergondza/following{/other_user}","gists_url":"https://api.github.com/users/olivergondza/gists{/gist_id}","starred_url":"https://api.github.com/users/olivergondza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivergondza/subscriptions","organizations_url":"https://api.github.com/users/olivergondza/orgs","repos_url":"https://api.github.com/users/olivergondza/repos","events_url":"https://api.github.com/users/olivergondza/events{/privacy}","received_events_url":"https://api.github.com/users/olivergondza/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T07:27:56Z","updated_at":"2016-04-13T07:27:56Z","body":"> IIRC the JenkinsRule in JTH can be used as a ClassRule and it has not caused much problems.\r\n\r\nLooking at Core tests `@ClassRule` is used 3 times in total but only once with `JenkinsRule` - in a class with a single test method.\r\n\r\n> If there is some consensus I'd happily take the first two commits and some refactor (moving the findAvailablePort to some helper) and put it in another PR (keeping this one closed as it is for reference).\r\n\r\nIt seems to be used by LDAP tests only. Both `login_no_ldap` and `login_use_fallback_server` in fact needs local port where no LDAP is running (which we can assume is virtually any port except the one where we have just started LDAP). The functionality seems duplicated by `LocalController#randomLocalPort` already. I guess we are safe to get rid of `findAvailablePort`."}}