Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 167561 Details for
Bug 302654
support for Bugzilla 3.6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
302654.txt (text/plain), 10.03 KB, created by
Frank Becker
on 2010-05-07 16:20:24 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2010-05-07 16:20:24 EDT
Size:
10.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.tests >Index: src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java,v >retrieving revision 1.192 >diff -u -r1.192 BugzillaRepositoryConnectorTest.java >--- src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java 6 Apr 2010 17:17:41 -0000 1.192 >+++ src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java 7 May 2010 20:16:41 -0000 >@@ -38,10 +38,10 @@ > import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil; > import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; > import org.eclipse.mylyn.tasks.core.ITask; >-import org.eclipse.mylyn.tasks.core.RepositoryResponse; >-import org.eclipse.mylyn.tasks.core.TaskMapping; > import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState; >+import org.eclipse.mylyn.tasks.core.RepositoryResponse; > import org.eclipse.mylyn.tasks.core.RepositoryResponse.ResponseKind; >+import org.eclipse.mylyn.tasks.core.TaskMapping; > import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy; > import org.eclipse.mylyn.tasks.core.data.TaskAttribute; > import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper; >@@ -344,8 +344,9 @@ > // } > // > public void testStdWorkflow32() throws Exception { >-// init32(); >- doStdWorkflow("3"); >+ if (BugzillaFixture.current() != BugzillaFixture.BUGS_3_6_CUSTOM) { >+ doStdWorkflow("3"); >+ } > } > > private void doStdWorkflow(String DupBugID) throws Exception { >@@ -776,8 +777,9 @@ > taskData.getRoot().getAttribute(BugzillaAttribute.DEADLINE.getKey()).setValue("" + deadline); > } > >- taskData.getRoot().getAttribute(BugzillaAttribute.NEW_COMMENT.getKey()).setValue( >- "New Estimate: " + estimatedTime + "\nNew Remaining: " + remainingTime + "\nAdd: " + addTime); >+ taskData.getRoot() >+ .getAttribute(BugzillaAttribute.NEW_COMMENT.getKey()) >+ .setValue("New Estimate: " + estimatedTime + "\nNew Remaining: " + remainingTime + "\nAdd: " + addTime); > Set<TaskAttribute> changed = new HashSet<TaskAttribute>(); > changed.add(taskData.getRoot().getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey())); > changed.add(taskData.getRoot().getAttribute(BugzillaAttribute.REMAINING_TIME.getKey())); >@@ -793,12 +795,12 @@ > model = createModel(task); > taskData = model.getTaskData(); > >- assertEquals(estimatedTime, Float.parseFloat(taskData.getRoot().getAttribute( >- BugzillaAttribute.ESTIMATED_TIME.getKey()).getValue())); >- assertEquals(remainingTime, Float.parseFloat(taskData.getRoot().getAttribute( >- BugzillaAttribute.REMAINING_TIME.getKey()).getValue())); >- assertEquals(actualTime + addTime, Float.parseFloat(taskData.getRoot().getAttribute( >- BugzillaAttribute.ACTUAL_TIME.getKey()).getValue())); >+ assertEquals(estimatedTime, >+ Float.parseFloat(taskData.getRoot().getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey()).getValue())); >+ assertEquals(remainingTime, >+ Float.parseFloat(taskData.getRoot().getAttribute(BugzillaAttribute.REMAINING_TIME.getKey()).getValue())); >+ assertEquals(actualTime + addTime, >+ Float.parseFloat(taskData.getRoot().getAttribute(BugzillaAttribute.ACTUAL_TIME.getKey()).getValue())); > if (enableDeadline) { > assertEquals(deadline, taskData.getRoot().getAttribute(BugzillaAttribute.DEADLINE.getKey()).getValue()); > } >@@ -892,10 +894,10 @@ > event.setTaskRepository(repository); > event.setFullSynchronization(true); > connector.preSynchronization(event, null); >- assertTrue("Expected " + task4.getTaskId() + ", got: " + event.getStaleTasks(), event.getStaleTasks().contains( >- task4)); >- assertTrue("Expected " + task5.getTaskId() + ", got: " + event.getStaleTasks(), event.getStaleTasks().contains( >- task5)); >+ assertTrue("Expected " + task4.getTaskId() + ", got: " + event.getStaleTasks(), >+ event.getStaleTasks().contains(task4)); >+ assertTrue("Expected " + task5.getTaskId() + ", got: " + event.getStaleTasks(), >+ event.getStaleTasks().contains(task5)); > > TasksUiInternal.synchronizeTasks(connector, tasks, true, null); > >Index: src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java,v >retrieving revision 1.6 >diff -u -r1.6 BugzillaXMLRPCTest.java >--- src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java 26 Apr 2010 19:54:07 -0000 1.6 >+++ src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java 7 May 2010 20:16:41 -0000 >@@ -20,7 +20,6 @@ > import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture; > import org.eclipse.mylyn.commons.net.AuthenticationType; > import org.eclipse.mylyn.commons.net.WebLocation; >-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaVersion; > import org.eclipse.mylyn.internal.bugzilla.core.service.BugzillaXmlRpcClient; > > /** >@@ -42,44 +41,40 @@ > > @SuppressWarnings("unused") > public void testxmlrpc() throws Exception { >- int uID = bugzillaClient.login(); >- String x0 = bugzillaClient.getVersion(); >- HashMap<?, ?> x1 = bugzillaClient.getTime(); >- Date x2 = bugzillaClient.getDBTime(); >- Date x3 = bugzillaClient.getWebTime(); >- Object[] xx0 = bugzillaClient.getUserInfoFromIDs(new Integer[] { 1, 2 }); >- Object[] xx1 = bugzillaClient.getUserInfoFromNames(new String[] { "tests@mylyn.eclipse.org" }); >- Object[] xx2 = bugzillaClient.getUserInfoWithMatch(new String[] { "est" }); >- Object[] xx3 = bugzillaClient.getAllFields(); >- Object[] xx4 = bugzillaClient.getFieldsWithNames(new String[] { "qa_contact" }); >- Object[] xx5 = bugzillaClient.getFieldsWithIDs(new Integer[] { 12, 18 }); >- Object[] xx6 = bugzillaClient.getSelectableProducts(); >- Object[] xx7 = bugzillaClient.getEnterableProducts(); >- Object[] xx8 = bugzillaClient.getAccessibleProducts(); >- Object[] xx9 = bugzillaClient.getProducts(new Integer[] { 1, 3 }); >- int i = 9; >- i++; >+ if (BugzillaFixture.current() != BugzillaFixture.BUGS_3_6_NO_XMLRPC) { >+ int uID = bugzillaClient.login(); >+ String x0 = bugzillaClient.getVersion(); >+ HashMap<?, ?> x1 = bugzillaClient.getTime(); >+ Date x2 = bugzillaClient.getDBTime(); >+ Date x3 = bugzillaClient.getWebTime(); >+ Object[] xx0 = bugzillaClient.getUserInfoFromIDs(new Integer[] { 1, 2 }); >+ Object[] xx1 = bugzillaClient.getUserInfoFromNames(new String[] { "tests@mylyn.eclipse.org" }); >+ Object[] xx2 = bugzillaClient.getUserInfoWithMatch(new String[] { "est" }); >+ Object[] xx3 = bugzillaClient.getAllFields(); >+ Object[] xx4 = bugzillaClient.getFieldsWithNames(new String[] { "qa_contact" }); >+ Object[] xx5 = bugzillaClient.getFieldsWithIDs(new Integer[] { 12, 18 }); >+ Object[] xx6 = bugzillaClient.getSelectableProducts(); >+ Object[] xx7 = bugzillaClient.getEnterableProducts(); >+ Object[] xx8 = bugzillaClient.getAccessibleProducts(); >+ Object[] xx9 = bugzillaClient.getProducts(new Integer[] { 1, 3 }); >+ } > } > > @SuppressWarnings("unused") > public void testxmlrpcInstalled() throws Exception { >- int uID = bugzillaClient.login(); >- assertEquals(2, uID); >- BugzillaFixture.current().getBugzillaVersion(); >- if (BugzillaFixture.current().getBugzillaVersion().compareTo(BugzillaVersion.BUGZILLA_3_6) == 0) { >- uID = -1; >- WebLocation webLocation = new WebLocation(BugzillaFixture.current().getRepositoryUrl() >- + "noxmlrpc/xmlrpc.cgi"); >- webLocation.setCredentials(AuthenticationType.REPOSITORY, "tests@mylyn.eclipse.org", "mylyntest"); >- BugzillaXmlRpcClient bugzillaClientNoXMLRPC = new BugzillaXmlRpcClient(webLocation); >- bugzillaClientNoXMLRPC.setContentTypeCheckingEnabled(true); >+ int uID = -1; >+ BugzillaFixture a = BugzillaFixture.current(); >+ if (BugzillaFixture.current() == BugzillaFixture.BUGS_3_6_NO_XMLRPC) { > try { >- uID = bugzillaClientNoXMLRPC.login(); >+ uID = bugzillaClient.login(); > fail("Never reach this! We should get an XmlRpcException"); > } catch (XmlRpcException e) { > assertEquals("The server returned an unexpected content type: 'text/html; charset=UTF-8'", > e.getMessage()); > } >+ } else { >+ uID = bugzillaClient.login(); >+ assertEquals(2, uID); > } > } > >Index: src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaFixture.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaFixture.java,v >retrieving revision 1.26 >diff -u -r1.26 BugzillaFixture.java >--- src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaFixture.java 3 May 2010 20:14:34 -0000 1.26 >+++ src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaFixture.java 7 May 2010 20:16:41 -0000 >@@ -68,6 +68,10 @@ > > public static final String TEST_BUGZILLA_36_URL = getServerUrl("bugs36"); > >+ public static final String TEST_BUGZILLA_36_CUSTOM_URL = getServerUrl("bugs36customWF"); >+ >+ public static final String TEST_BUGZILLA_36_NO_XMLRPC = getServerUrl("bugs36noxmlrpc"); >+ > public static final String TEST_BUGZILLA_HEAD_URL = getServerUrl("bugshead"); > > public static final String TEST_BUGZILLA_LATEST_URL = TEST_BUGZILLA_36_URL; >@@ -97,13 +101,19 @@ > public static BugzillaFixture BUGS_3_6 = new BugzillaFixture(BugzillaFixture.TEST_BUGZILLA_36_URL, // > "3.6", ""); > >+ public static BugzillaFixture BUGS_3_6_CUSTOM = new BugzillaFixture(BugzillaFixture.TEST_BUGZILLA_36_CUSTOM_URL, // >+ "3.6", "CUSTOM-WF"); >+ >+ public static BugzillaFixture BUGS_3_6_NO_XMLRPC = new BugzillaFixture(BugzillaFixture.TEST_BUGZILLA_36_NO_XMLRPC, // >+ "3.6", "NO-XMLRPC"); >+ > public static BugzillaFixture BUGS_HEAD = new BugzillaFixture(BugzillaFixture.TEST_BUGZILLA_HEAD_URL, // > "3.7", ""); > > public static BugzillaFixture DEFAULT = BUGS_3_6; > > public static final BugzillaFixture[] ALL = new BugzillaFixture[] { BUGS_2_22, BUGS_3_0, BUGS_3_2, BUGS_3_4, >- BUGS_3_6, BUGS_HEAD }; >+ BUGS_3_6, BUGS_3_6_CUSTOM, BUGS_3_6_NO_XMLRPC, BUGS_HEAD }; > > private final String version; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 302654
:
159063
|
159064
|
166121
|
166122
|
166129
|
166130
| 167561 |
167562
|
168437
|
168438