Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.3 RC4
-
Component/s: Transport: HTTP(S) / Jetty
-
Labels:None
-
User impact:Very Low
-
Similar Issues:None
Description
validateHeader returns happily if the expected header is not present, which allows otherwise broken tests to pass.
I suggest to add a fail() statement at the end to solve this:
private void validateHeader(final Header[] headers, final String headerName, final String expectedValue) { for (final Header header : headers) { if (headerName.equals(header.getName())) { assertEquals(expectedValue, header.getValue()); return; } } fail(String.format("Didn't find header: %s=%s in headers: %s", headerName, expectedValue, headers)); }
Activity
Evangelina Martinez Ruiz Moreno
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Evangelina Martinez Ruiz Moreno [ evangelinamrm ] |
Evangelina Martinez Ruiz Moreno
made changes -
| Priority | To be reviewed [ 6 ] | Critical [ 2 ] |
Evangelina Martinez Ruiz Moreno
made changes -
| Status | Open [ 1 ] | In Progress [ 3 ] |
Evangelina Martinez Ruiz Moreno
17/Apr/12 05:03 PM
View full commit
MULE-6170: HttpResponseBuilderTestCase.validateHeader() is incorrect which masks broken tests
Fixing incorrect validation on test case
git-svn-id: https://svn.codehaus.org/mule/branches/mule-3.3.x@24294 bf997673-6b11-0410-b953-e057580c5b09
Alejandro Sequeira
made changes -
| Affects Version/s | 3.3.0 [ 11110 ] | |
| Affects Version/s | 3.3 RC4 [ 11276 ] |
Evangelina Martinez Ruiz Moreno
made changes -
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 3.4.0 [ 11142 ] | |
| Fix Version/s | 3.3.0 [ 11110 ] | |
| Status | In Progress [ 3 ] | Closed [ 6 ] |
| Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
|---|---|---|---|---|---|---|---|---|---|
|
17m 35s | 1 | Evangelina Martinez Ruiz Moreno | 17/Apr/12 04:48 PM | |||||
|
56d 21h 51m | 1 | Evangelina Martinez Ruiz Moreno | 13/Jun/12 02:39 PM |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Repository mule on http://foo.bar/ failed: Error in remote call to 'FishEye 0 (http://foo.bar/)' (http://foo.bar) [AbstractRestCommand{path='/rest-service-fe/changeset-v1/listChangesets/', params={expand=changesets[-21:-1].revisions[0:29], comment=MULE-6170, p4JobFixed=MULE-6170, rep=mule}, methodType=GET}] : java.net.UnknownHostException: foo.bar
headers.toString() doesn't render well so adding it in the fail statement message doesn't help much.