{"action":"created","comment":{"url":"https://api.github.com/repos/spockframework/spock/pulls/comments/27044934","id":27044934,"diff_hunk":"@@ -17,20 +17,52 @@\n import org.spockframework.runtime.model.IterationInfo;\n import org.spockframework.runtime.model.NameProvider;\n \n+import java.util.concurrent.ConcurrentHashMap;\n+import java.util.concurrent.ConcurrentMap;\n+import java.util.concurrent.atomic.AtomicInteger;\n+\n public class SafeIterationNameProvider implements NameProvider<IterationInfo> {\n   private final NameProvider<IterationInfo> delegate;\n-  private int iterationCount;\n-  \n+  private final AtomicInteger iterationCount = new AtomicInteger(0);\n+  private final ConcurrentMap<String, Boolean> usedNames = new ConcurrentHashMap<String, Boolean>();\n+\n   public SafeIterationNameProvider(NameProvider<IterationInfo> delegate) {\n     this.delegate = delegate;\n   }\n-  \n+\n   public String getName(IterationInfo iteration) {\n-    String safeName = iteration.getParent().isReportIterations() ? \n-        String.format(\"%s[%d]\", iteration.getParent().getName(), iterationCount++) : iteration.getParent().getName();\n-    \n+    final String name = getNameImpl(iteration);\n+    if (iteration.getParent().isReportIterations()){\n+      return unique(name);\n+    }else {\n+      return name;\n+    }\n+  }\n+\n+    private String unique(String name) {","path":"spock-core/src/main/java/org/spockframework/runtime/SafeIterationNameProvider.java","position":32,"original_position":32,"commit_id":"b1e07dcbbc3de0e7a6f821be92aa017d6e9fb373","original_commit_id":"cc48f371c0f93c61c8565a0acd33ea9d1db81497","user":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"body":"If you use @Unroll annotation with template - you will provide your own names, not based on iteration number.","created_at":"2015-03-24T16:22:40Z","updated_at":"2015-03-24T16:22:40Z","html_url":"https://github.com/spockframework/spock/pull/67#discussion_r27044934","pull_request_url":"https://api.github.com/repos/spockframework/spock/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/spockframework/spock/pulls/comments/27044934"},"html":{"href":"https://github.com/spockframework/spock/pull/67#discussion_r27044934"},"pull_request":{"href":"https://api.github.com/repos/spockframework/spock/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/spockframework/spock/pulls/67","id":31668434,"html_url":"https://github.com/spockframework/spock/pull/67","diff_url":"https://github.com/spockframework/spock/pull/67.diff","patch_url":"https://github.com/spockframework/spock/pull/67.patch","issue_url":"https://api.github.com/repos/spockframework/spock/issues/67","number":67,"state":"open","locked":false,"title":"Support for parallel execution of features and iterations","user":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"body":"JUnit supports parallel execution of test methods: Runner should extends ParentRunner and utilize RunnerScheduler to execute tests.","created_at":"2015-03-21T08:45:02Z","updated_at":"2015-03-24T16:22:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81cb257c42b66cad283ca77420022ae9d00674a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spockframework/spock/pulls/67/commits","review_comments_url":"https://api.github.com/repos/spockframework/spock/pulls/67/comments","review_comment_url":"https://api.github.com/repos/spockframework/spock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spockframework/spock/issues/67/comments","statuses_url":"https://api.github.com/repos/spockframework/spock/statuses/b1e07dcbbc3de0e7a6f821be92aa017d6e9fb373","head":{"label":"Fuud:parallel-execution__over__spockframework-groovy-2.3","ref":"parallel-execution__over__spockframework-groovy-2.3","sha":"b1e07dcbbc3de0e7a6f821be92aa017d6e9fb373","user":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"repo":{"id":23491035,"name":"spock","full_name":"Fuud/spock","owner":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Fuud/spock","description":"The Enterprise-ready testing and specification framework.","fork":true,"url":"https://api.github.com/repos/Fuud/spock","forks_url":"https://api.github.com/repos/Fuud/spock/forks","keys_url":"https://api.github.com/repos/Fuud/spock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fuud/spock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fuud/spock/teams","hooks_url":"https://api.github.com/repos/Fuud/spock/hooks","issue_events_url":"https://api.github.com/repos/Fuud/spock/issues/events{/number}","events_url":"https://api.github.com/repos/Fuud/spock/events","assignees_url":"https://api.github.com/repos/Fuud/spock/assignees{/user}","branches_url":"https://api.github.com/repos/Fuud/spock/branches{/branch}","tags_url":"https://api.github.com/repos/Fuud/spock/tags","blobs_url":"https://api.github.com/repos/Fuud/spock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fuud/spock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fuud/spock/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fuud/spock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fuud/spock/statuses/{sha}","languages_url":"https://api.github.com/repos/Fuud/spock/languages","stargazers_url":"https://api.github.com/repos/Fuud/spock/stargazers","contributors_url":"https://api.github.com/repos/Fuud/spock/contributors","subscribers_url":"https://api.github.com/repos/Fuud/spock/subscribers","subscription_url":"https://api.github.com/repos/Fuud/spock/subscription","commits_url":"https://api.github.com/repos/Fuud/spock/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fuud/spock/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fuud/spock/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fuud/spock/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fuud/spock/contents/{+path}","compare_url":"https://api.github.com/repos/Fuud/spock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fuud/spock/merges","archive_url":"https://api.github.com/repos/Fuud/spock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fuud/spock/downloads","issues_url":"https://api.github.com/repos/Fuud/spock/issues{/number}","pulls_url":"https://api.github.com/repos/Fuud/spock/pulls{/number}","milestones_url":"https://api.github.com/repos/Fuud/spock/milestones{/number}","notifications_url":"https://api.github.com/repos/Fuud/spock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fuud/spock/labels{/name}","releases_url":"https://api.github.com/repos/Fuud/spock/releases{/id}","created_at":"2014-08-30T12:12:32Z","updated_at":"2014-08-30T15:35:43Z","pushed_at":"2015-03-24T14:34:13Z","git_url":"git://github.com/Fuud/spock.git","ssh_url":"git@github.com:Fuud/spock.git","clone_url":"https://github.com/Fuud/spock.git","svn_url":"https://github.com/Fuud/spock","homepage":"http://spockframework.org","size":8752,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"groovy-1.8"}},"base":{"label":"spockframework:groovy-2.3","ref":"groovy-2.3","sha":"07c2d477563ccb40dde6a7f701a2056ebe4c10e1","user":{"login":"spockframework","id":297723,"avatar_url":"https://avatars.githubusercontent.com/u/297723?v=3","gravatar_id":"","url":"https://api.github.com/users/spockframework","html_url":"https://github.com/spockframework","followers_url":"https://api.github.com/users/spockframework/followers","following_url":"https://api.github.com/users/spockframework/following{/other_user}","gists_url":"https://api.github.com/users/spockframework/gists{/gist_id}","starred_url":"https://api.github.com/users/spockframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spockframework/subscriptions","organizations_url":"https://api.github.com/users/spockframework/orgs","repos_url":"https://api.github.com/users/spockframework/repos","events_url":"https://api.github.com/users/spockframework/events{/privacy}","received_events_url":"https://api.github.com/users/spockframework/received_events","type":"Organization","site_admin":false},"repo":{"id":1161862,"name":"spock","full_name":"spockframework/spock","owner":{"login":"spockframework","id":297723,"avatar_url":"https://avatars.githubusercontent.com/u/297723?v=3","gravatar_id":"","url":"https://api.github.com/users/spockframework","html_url":"https://github.com/spockframework","followers_url":"https://api.github.com/users/spockframework/followers","following_url":"https://api.github.com/users/spockframework/following{/other_user}","gists_url":"https://api.github.com/users/spockframework/gists{/gist_id}","starred_url":"https://api.github.com/users/spockframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spockframework/subscriptions","organizations_url":"https://api.github.com/users/spockframework/orgs","repos_url":"https://api.github.com/users/spockframework/repos","events_url":"https://api.github.com/users/spockframework/events{/privacy}","received_events_url":"https://api.github.com/users/spockframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spockframework/spock","description":"The Enterprise-ready testing and specification framework.","fork":false,"url":"https://api.github.com/repos/spockframework/spock","forks_url":"https://api.github.com/repos/spockframework/spock/forks","keys_url":"https://api.github.com/repos/spockframework/spock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spockframework/spock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spockframework/spock/teams","hooks_url":"https://api.github.com/repos/spockframework/spock/hooks","issue_events_url":"https://api.github.com/repos/spockframework/spock/issues/events{/number}","events_url":"https://api.github.com/repos/spockframework/spock/events","assignees_url":"https://api.github.com/repos/spockframework/spock/assignees{/user}","branches_url":"https://api.github.com/repos/spockframework/spock/branches{/branch}","tags_url":"https://api.github.com/repos/spockframework/spock/tags","blobs_url":"https://api.github.com/repos/spockframework/spock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spockframework/spock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spockframework/spock/git/refs{/sha}","trees_url":"https://api.github.com/repos/spockframework/spock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spockframework/spock/statuses/{sha}","languages_url":"https://api.github.com/repos/spockframework/spock/languages","stargazers_url":"https://api.github.com/repos/spockframework/spock/stargazers","contributors_url":"https://api.github.com/repos/spockframework/spock/contributors","subscribers_url":"https://api.github.com/repos/spockframework/spock/subscribers","subscription_url":"https://api.github.com/repos/spockframework/spock/subscription","commits_url":"https://api.github.com/repos/spockframework/spock/commits{/sha}","git_commits_url":"https://api.github.com/repos/spockframework/spock/git/commits{/sha}","comments_url":"https://api.github.com/repos/spockframework/spock/comments{/number}","issue_comment_url":"https://api.github.com/repos/spockframework/spock/issues/comments{/number}","contents_url":"https://api.github.com/repos/spockframework/spock/contents/{+path}","compare_url":"https://api.github.com/repos/spockframework/spock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spockframework/spock/merges","archive_url":"https://api.github.com/repos/spockframework/spock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spockframework/spock/downloads","issues_url":"https://api.github.com/repos/spockframework/spock/issues{/number}","pulls_url":"https://api.github.com/repos/spockframework/spock/pulls{/number}","milestones_url":"https://api.github.com/repos/spockframework/spock/milestones{/number}","notifications_url":"https://api.github.com/repos/spockframework/spock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spockframework/spock/labels{/name}","releases_url":"https://api.github.com/repos/spockframework/spock/releases{/id}","created_at":"2010-12-12T19:02:34Z","updated_at":"2015-03-23T18:35:09Z","pushed_at":"2015-03-24T14:34:13Z","git_url":"git://github.com/spockframework/spock.git","ssh_url":"git@github.com:spockframework/spock.git","clone_url":"https://github.com/spockframework/spock.git","svn_url":"https://github.com/spockframework/spock","homepage":"http://spockframework.org","size":18796,"stargazers_count":573,"watchers_count":573,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":122,"mirror_url":null,"open_issues_count":30,"forks":122,"open_issues":30,"watchers":573,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spockframework/spock/pulls/67"},"html":{"href":"https://github.com/spockframework/spock/pull/67"},"issue":{"href":"https://api.github.com/repos/spockframework/spock/issues/67"},"comments":{"href":"https://api.github.com/repos/spockframework/spock/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/spockframework/spock/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/spockframework/spock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spockframework/spock/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/spockframework/spock/statuses/b1e07dcbbc3de0e7a6f821be92aa017d6e9fb373"}}}}