Commit 0d9fbf17 authored by terrymanu's avatar terrymanu
Browse files

refactor sharding-opentracing's test cases

parent c702e0ae
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -17,15 +17,14 @@

package io.shardingsphere.opentracing;

import io.shardingsphere.opentracing.listener.AllListenerTests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({
        ExecuteEventListenerTest.class,
        SqlRoutingEventListenerTest.class,
        MergeEventListenerTest.class,
        ShardingJDBCTracerTest.class
        ShardingTracerTest.class,
        AllListenerTests.class
})
public final class AllTests {
}
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;

public final class ShardingJDBCTracerTest {
public final class ShardingTracerTest {
    
    @Before
    public void setUp() throws NoSuchFieldException, IllegalAccessException {
+33 −0
Original line number Diff line number Diff line
/*
 * Copyright 2016-2018 shardingsphere.io.
 * <p>
 * Licensed 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.
 * </p>
 */

package io.shardingsphere.opentracing.listener;

import io.shardingsphere.opentracing.listener.execution.ExecuteEventListenerTest;
import io.shardingsphere.opentracing.listener.merger.MergeEventListenerTest;
import io.shardingsphere.opentracing.listener.routing.RoutingEventListenerTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({
        RoutingEventListenerTest.class,
        ExecuteEventListenerTest.class,
        MergeEventListenerTest.class
})
public final class AllListenerTests {
}
+2 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 * </p>
 */

package io.shardingsphere.opentracing;
package io.shardingsphere.opentracing.listener.execution;

import com.google.common.collect.HashMultimap;
import com.google.common.eventbus.EventBus;
@@ -33,6 +33,7 @@ import io.shardingsphere.core.executor.type.statement.StatementUnit;
import io.shardingsphere.core.routing.SQLExecutionUnit;
import io.shardingsphere.core.routing.SQLUnit;
import io.shardingsphere.core.event.ShardingEventBusInstance;
import io.shardingsphere.opentracing.ShardingTracer;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
+2 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 * </p>
 */

package io.shardingsphere.opentracing;
package io.shardingsphere.opentracing.listener.merger;

import com.google.common.collect.HashMultimap;
import com.google.common.eventbus.EventBus;
@@ -39,6 +39,7 @@ import io.shardingsphere.core.parsing.parser.dialect.mysql.statement.ShowColumns
import io.shardingsphere.core.parsing.parser.dialect.mysql.statement.ShowDatabasesStatement;
import io.shardingsphere.core.rule.ShardingRule;
import io.shardingsphere.core.event.ShardingEventBusInstance;
import io.shardingsphere.opentracing.ShardingTracer;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
Loading