X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2FStatisticsServletTest.java;h=3438627d820dacfe1f476fae16365dbfeff555e7;hp=64d13e94292f74b02b37c814d02c1f292d146224;hb=refs%2Fchanges%2F76%2F93176%2F1;hpb=2e0f4f0a4673cf8dd08f28b7125113b7aedbdb1d diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/StatisticsServletTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/StatisticsServletTest.java index 64d13e94..3438627d 100755 --- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/StatisticsServletTest.java +++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/StatisticsServletTest.java @@ -125,7 +125,6 @@ public class StatisticsServletTest { @Test public void Given_Request_Is_HTTP_GET_With_GroupId_But_No_FeedId_Parameters_Then_Request_Succeeds() throws Exception { - addAliasForSubstringIndex(); ServletOutputStream outStream = mock(ServletOutputStream.class); when(response.getOutputStream()).thenReturn(outStream); statisticsServlet.doGet(request, response); @@ -135,7 +134,6 @@ public class StatisticsServletTest { @Test public void Given_Request_Is_HTTP_GET_With_GroupId_And_FeedId_Parameters_Then_Request_Succeeds() throws Exception { - addAliasForSubstringIndex(); when(request.getParameter("feedid")).thenReturn("1"); when(request.getParameter("statusCode")).thenReturn("500"); ServletOutputStream outStream = mock(ServletOutputStream.class); @@ -158,10 +156,4 @@ public class StatisticsServletTest { when(request.getParameter("groupid")).thenReturn("1"); when(request.getParameter("subid")).thenReturn("1"); } - private void addAliasForSubstringIndex() throws SQLException { - String sql = "CREATE ALIAS IF NOT EXISTS `SUBSTRING_INDEX`AS $$ String Function(String one, String two, String three){ return \"url\"; }$$;"; - Connection conn = db.getConnection(); - PreparedStatement pst = conn.prepareStatement(sql); - pst.execute(); - } }