summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-08 09:55:43 (EST)
committer Steffen Pingel2012-02-08 09:55:43 (EST)
commit23253ed67a41de9e4fb47c8172ac2282e4e1447f (patch)
tree740cd2e327b8a42fe7dcd65b6e90d24b95284eba
parent17c041720cf0c889b40e9cd2a8b1e2cef1d564b6 (diff)
downloadorg.eclipse.mylyn.tasks-23253ed67a41de9e4fb47c8172ac2282e4e1447f.zip
org.eclipse.mylyn.tasks-23253ed67a41de9e4fb47c8172ac2282e4e1447f.tar.gz
org.eclipse.mylyn.tasks-23253ed67a41de9e4fb47c8172ac2282e4e1447f.tar.bz2
RESOLVED - bug 369697: force refresh of repository configuration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=369697 Change-Id: Ife6bcc06bc0c342e343c841f445c78e8337776fb
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java8
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java2
2 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
index aefd83b..91ecaf1 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
@@ -46,6 +46,7 @@ import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
import org.eclipse.mylyn.tasks.ui.TasksUi;
@@ -261,14 +262,19 @@ public class TracRepositoryConnectorTest extends TestCase {
public void testUpdateTaskFromTaskDataSummaryOnly() throws Exception {
TracTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
ITracClient client = connector.getClientManager().getTracClient(repository);
- client.updateAttributes(new NullProgressMonitor(), false);
+ // ensure that client has the correct field configuration
+ client.updateAttributes(new NullProgressMonitor(), true);
assertEquals(client.getAccessMode().name(), repository.getVersion());
// prepare task data
TracTicket ticket = new TracTicket(456);
ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
TaskData taskData = taskDataHandler.createTaskDataFromTicket(client, repository, ticket, null);
+ TaskAttribute attribute = taskData.getRoot().getMappedAttribute(TaskAttribute.PRIORITY);
System.err.println(taskData.getRoot());
+ if (attribute != null) {
+ assertEquals("major", attribute.getValue());
+ }
ITask task = TasksUi.getRepositoryModel().createTask(repository, taskData.getTaskId());
task.setPriority("P2");
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java
index 75de156..41570ef 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java
@@ -32,7 +32,7 @@ import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
public class TracRepositoryQueryTest extends TestCase {
public void testChangeRepositoryUrl() throws Exception {
- TaskRepository repository = TracFixture.DEFAULT.singleRepository();
+ TaskRepository repository = TracFixture.TRAC_0_12_XML_RPC.singleRepository();
TracSearch search = new TracSearch();
String queryUrl = repository.getRepositoryUrl() + ITracClient.QUERY_URL + search.toUrl();