mirror of https://github.com/apache/druid.git
Merge pull request #2211 from rasahner/LogTestStartEnd
log start/end of each integration test, make test method names unique
This commit is contained in:
commit
486a6baf6e
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Licensed to Metamarkets Group Inc. (Metamarkets) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. Metamarkets licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.druid.testing.utils;
|
||||
|
||||
import org.testng.ITestResult;
|
||||
import org.testng.TestListenerAdapter;
|
||||
import com.metamx.common.logger.Logger;
|
||||
|
||||
public class LoggerListener extends TestListenerAdapter
|
||||
{
|
||||
private static final Logger LOG = new Logger(LoggerListener.class);
|
||||
|
||||
@Override
|
||||
public void onTestFailure(ITestResult tr)
|
||||
{
|
||||
LOG.info ("[%s] -- Test method failed", tr.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestSkipped(ITestResult tr)
|
||||
{
|
||||
LOG.info ("[%s] -- Test method skipped", tr.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestSuccess(ITestResult tr)
|
||||
{
|
||||
LOG.info ("[%s] -- Test method passed", tr.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestStart(ITestResult tr)
|
||||
{
|
||||
LOG.info ("[%s] -- TEST START", tr.getName() );
|
||||
}
|
||||
|
||||
}
|
|
@ -61,7 +61,7 @@ public class ITUnionQueryTest extends AbstractIndexerTest
|
|||
IntegrationTestingConfig config;
|
||||
|
||||
@Test
|
||||
public void testRealtimeIndexTask() throws Exception
|
||||
public void testUnionQuery() throws Exception
|
||||
{
|
||||
final int numTasks = 4;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ITTwitterQueryTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testQueriesFromFile() throws Exception
|
||||
public void testTwitterQueriesFromFile() throws Exception
|
||||
{
|
||||
queryHelper.testQueriesFromFile(TWITTER_QUERIES_RESOURCE, 2);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ITWikipediaQueryTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testQueriesFromFile() throws Exception
|
||||
public void testWikipediaQueriesFromFile() throws Exception
|
||||
{
|
||||
queryHelper.testQueriesFromFile(WIKIPEDIA_QUERIES_RESOURCE, 2);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
|
||||
<suite name="IntegrationTestSuite">
|
||||
<listeners>
|
||||
<listener class-name="io.druid.testing.utils.LoggerListener" />
|
||||
</listeners>
|
||||
<test name="AllTests">
|
||||
<packages>
|
||||
<package name="io.druid.tests.*"/>
|
||||
|
|
Loading…
Reference in New Issue