mirror of https://github.com/apache/druid.git
Fix for issue 2021
This commit is contained in:
parent
41730b96d4
commit
a3eb863c8e
|
@ -168,6 +168,7 @@ public class DatasourcesResource
|
|||
}
|
||||
|
||||
@DELETE
|
||||
@Deprecated
|
||||
@Path("/{dataSourceName}")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Response deleteDataSource(
|
||||
|
@ -201,22 +202,6 @@ public class DatasourcesResource
|
|||
return Response.ok().build();
|
||||
}
|
||||
|
||||
/*
|
||||
Uncomment this method once the method deleteSourceName (just above this) is deleted.
|
||||
@DELETE
|
||||
@Path("/{dataSourceName}")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Response deleteDataSource(
|
||||
@PathParam("dataSourceName") final String dataSourceName
|
||||
)
|
||||
{
|
||||
if (!databaseSegmentManager.removeDatasource(dataSourceName)) {
|
||||
return Response.noContent().build();
|
||||
}
|
||||
return Response.ok().build();
|
||||
}
|
||||
*/
|
||||
|
||||
@DELETE
|
||||
@Path("/{dataSourceName}/intervals/{interval}")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
|
|
@ -424,22 +424,4 @@ public class DatasourcesResourceTest
|
|||
EasyMock.verify(indexingServiceClient, server);
|
||||
}
|
||||
|
||||
/*
|
||||
Uncomment this unit test once the method testDeleteDataSource(string dataSourceName) is uncommented in class DatasourcesResource
|
||||
@Test
|
||||
public void testDeleteDataSource() throws Exception
|
||||
{
|
||||
MetadataSegmentManager databaseSegmentManager = EasyMock.createStrictMock(MetadataSegmentManager.class);
|
||||
EasyMock.expect(databaseSegmentManager.removeDatasource("datasource1")).andReturn(true).atLeastOnce();
|
||||
EasyMock.replay(server, databaseSegmentManager);
|
||||
|
||||
DatasourcesResource datasourcesResource = new DatasourcesResource(null, databaseSegmentManager, null);
|
||||
Response response = datasourcesResource.deleteDataSource("datasource1");
|
||||
|
||||
Assert.assertEquals(200, response.getStatus());
|
||||
Assert.assertEquals(null,response.getEntity());
|
||||
EasyMock.verify(databaseSegmentManager, server);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue