Skip to content

Commit

Permalink
fix test case error
Browse files Browse the repository at this point in the history
  • Loading branch information
liujianjun.ljj committed Mar 27, 2024
1 parent 70f16f3 commit 5ab7f31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alipay.sofa.rpc.event;
package com.alipay.sofa.rpc.tracer.sofatracer;

import com.alipay.common.tracer.core.holder.SofaTraceContextHolder;
import com.alipay.common.tracer.core.span.SofaTracerSpan;
import com.alipay.sofa.rpc.common.RemotingConstants;
import com.alipay.sofa.rpc.common.RpcOptions;
import com.alipay.sofa.rpc.context.RpcInternalContext;
import com.alipay.sofa.rpc.core.request.SofaRequest;
import com.alipay.sofa.rpc.event.ClientBeforeSendEvent;
import com.alipay.sofa.rpc.event.ClientStartInvokeEvent;
import com.alipay.sofa.rpc.event.EventBus;
import com.alipay.sofa.rpc.event.ServerReceiveEvent;
import com.alipay.sofa.rpc.tracer.sofatracer.log.tags.RpcSpanTags;
import io.opentracing.tag.Tags;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import java.util.Map;
Expand All @@ -41,11 +42,6 @@
*/
public class SofaTracerSubscriberTest {

@BeforeClass
public static void beforeClass() {
System.getProperties().put(RpcOptions.DEFAULT_TRACER, "sofaTracer");
}

@Test
public void testClientSendAndServerReceiveTracerEvent() {
SofaRequest sofaRequest = new SofaRequest();
Expand Down Expand Up @@ -85,9 +81,4 @@ public void testClientSendAndServerReceiveTracerEvent() {
SofaTraceContextHolder.getSofaTraceContext().clear();
}

@AfterClass
public static void afterClass() {
System.getProperties().remove(RpcOptions.DEFAULT_TRACER);
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"rpc.config.order": 999,
"logger.impl": "com.alipay.sofa.rpc.log.SLF4JLoggerImpl"
"logger.impl": "com.alipay.sofa.rpc.log.SLF4JLoggerImpl",
"default.tracer": "sofaTracer"
}

0 comments on commit 5ab7f31

Please sign in to comment.