diff options
author | Colin Ritchie | 2016-02-23 23:00:01 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-02-24 20:22:19 +0000 |
commit | cc7f16234f4428da36783b2b3debcc7a450bb17d (patch) | |
tree | f4c85ae9e42e632812a7c393ad3c4de246909484 /org.eclipse.mylyn.bugzilla.tests/src | |
parent | 30ce0120faab7592239bdffdd3eff70908d1c2e1 (diff) | |
download | org.eclipse.mylyn.tasks-cc7f16234f4428da36783b2b3debcc7a450bb17d.tar.gz org.eclipse.mylyn.tasks-cc7f16234f4428da36783b2b3debcc7a450bb17d.tar.xz org.eclipse.mylyn.tasks-cc7f16234f4428da36783b2b3debcc7a450bb17d.zip |
488277: ConcurrentModificationException in the mylyn bugzilla connector
Change-Id: Ic2209f1220a5a04a29d0048ed30e6beff20f78c3
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=488277
Signed-off-by: Colin Ritchie <colin.ritchie@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests/src')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/RepositoryConfigurationTest.java | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/RepositoryConfigurationTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/RepositoryConfigurationTest.java index f2404c129..825efa88d 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/RepositoryConfigurationTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/RepositoryConfigurationTest.java @@ -11,9 +11,17 @@ package org.eclipse.mylyn.bugzilla.tests.core; -import junit.framework.TestCase; +import java.util.List; +import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture; +import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute; +import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeMapper; +import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration; +import org.eclipse.mylyn.tasks.core.TaskRepository; +import org.eclipse.mylyn.tasks.core.data.TaskData; + +import junit.framework.TestCase; public class RepositoryConfigurationTest extends TestCase { @@ -49,4 +57,20 @@ public class RepositoryConfigurationTest extends TestCase { public void testGetUnconfirmedAllowed_noProduct() throws Exception { assertFalse(cfg.getUnconfirmedAllowed("no-product")); } + + public void testGetAttributeOptions() throws Exception { + TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, "http://repository"); + BugzillaAttributeMapper mapper = new BugzillaAttributeMapper(repository, BugzillaFixture.current().connector()); + TaskData taskData = new TaskData(mapper, repository.getConnectorKind(), repository.getRepositoryUrl(), ""); + + cfg.addItem(BugzillaAttribute.REP_PLATFORM, "3"); + cfg.addItem(BugzillaAttribute.REP_PLATFORM, "2"); + cfg.addItem(BugzillaAttribute.REP_PLATFORM, "1"); + List<String> options = cfg.getAttributeOptions(PRODUCT, + taskData.getRoot().createAttribute(BugzillaAttribute.REP_PLATFORM.getKey())); + assertEquals(3, options.size()); + assertEquals("1", options.get(0)); + assertEquals("2", options.get(1)); + assertEquals("3", options.get(2)); + } } |