Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 375057 - fix test failures for Mylyn 3.8
Summary: fix test failures for Mylyn 3.8
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.8   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 381564
Blocks:
  Show dependency tree
 
Reported: 2012-03-22 10:21 EDT by Steffen Pingel CLA
Modified: 2012-06-05 18:03 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2012-03-22 10:21:30 EDT
We need to reduce the number of spuriously failing tests.
Comment 1 Steffen Pingel CLA 2012-03-22 10:21:56 EDT
http://ci.mylyn.org/job/mylyn-3.7.x/116/TARGET=juno/testReport/org.eclipse.mylyn.bugzilla.tests/BugzillaRepositoryConnectorTest/testMultiRetrievalFailure_3_6_8/

java.lang.NullPointerException
	at org.eclipse.mylyn.bugzilla.tests.BugzillaRepositoryConnectorTest.testMultiRetrievalFailure(BugzillaRepositoryConnectorTest.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Comment 2 Frank Becker CLA 2012-03-22 12:57:53 EDT
Sorry,
I can not reproduce this. Maybe this was an network problem.
Comment 3 Steffen Pingel CLA 2012-03-22 13:02:16 EDT
That's the point, we need to make tests robust so they don't fail even if Bugzilla takes a bit longer to respond etc.
Comment 4 Frank Becker CLA 2012-03-22 13:25:15 EDT
What do you think we should do when Bugzilla takes a bit longer to response?

Should we catch the error and try to do the test again?
Comment 5 Steffen Pingel CLA 2012-03-22 13:57:14 EDT
I haven't looked into this particular test. We have to understand first what exactly is going wrong and if this is indeed a network problem or an actual bug in the code or test. Based on the results of that analysis we can decide on the proper course of action.
Comment 6 Frank Becker CLA 2012-03-23 15:43:34 EDT
Should we add logging of the HTTP requests and result including the response?

If so it can make sense to first do the bug#269803.

Thoughts?
Comment 7 Steffen Pingel CLA 2012-03-23 18:51:39 EDT
It failed again, this time with a different error:

junit.framework.AssertionFailedError: Expected: <null> but was: Status ERROR: org.eclipse.mylyn.bugzilla code=13 MylynStatus null
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at junit.framework.Assert.assertNull(Assert.java:233)
	at junit.framework.Assert.assertNull(Assert.java:226)
	at org.eclipse.mylyn.bugzilla.tests.BugzillaRepositoryConnectorTest.testMultiRetrievalFailure(BugzillaRepositoryConnectorTest.java:99)
	
The first step is to improve the assertions in the test case and provide better diagnostics when it fails.
Comment 8 Steffen Pingel CLA 2012-04-16 03:31:31 EDT
http://ci.mylyn.org/job/mylyn-3.8.x/TARGET=e3.8/lastCompletedBuild/testReport/org.eclipse.mylyn.bugzilla.tests/BugzillaRepositoryConnectorTest/testSynchChangedReports_3_4_14/

junit.framework.AssertionFailedError: Expected: 7575, 7576, got: [7576: summary]
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at org.eclipse.mylyn.bugzilla.tests.BugzillaRepositoryConnectorTest.testSynchChangedReports(BugzillaRepositoryConnectorTest.java:1153)
Comment 9 Steffen Pingel CLA 2012-06-05 18:03:27 EDT
All tests should be passing now.