hailin0 commented on a change in pull request #5339:
URL: https://github.com/apache/skywalking/pull/5339#discussion_r473000375



##########
File path: 
test/plugin/scenarios/spring-scheduled-scenario/src/main/java/org/apache/skywalking/apm/testcase/spring/scheduled/job/SchedulingJob.java
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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 org.apache.skywalking.apm.testcase.spring.scheduled.job;
+
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+
+@Component
+@EnableScheduling
+public class SchedulingJob {
+
+    private static final Logger logger = 
LogManager.getLogger(SchedulingJob.class);
+    
+    private static final OkHttpClient client = new 
OkHttpClient.Builder().build();
+
+    @Scheduled(fixedDelay = 5000)

Review comment:
       I found some bugs...  @wu-sheng 
   
   Expected to be normal when I use @Configuration
   -------------------
   
   
![9CFE35D62F59B825122F05C9D3555F27](https://user-images.githubusercontent.com/14371345/90636027-9a311d00-e25c-11ea-9e4f-1261fe2d2240.png)
   
![A37D3CE0897B9D84C08F71E841E6AF46](https://user-images.githubusercontent.com/14371345/90636076-aa48fc80-e25c-11ea-8f26-4a16c7a121d7.png)
   
   
   Duplicate tracing occurs when I use @Component
   -------------------
   
![0C5D9D790774A98490A8E3513A7EFCE8](https://user-images.githubusercontent.com/14371345/90636208-dc5a5e80-e25c-11ea-8b73-95368df28454.png)
   
![1A2F323E9BFF2FC94BD11ACCD690C27B](https://user-images.githubusercontent.com/14371345/90636226-e2e8d600-e25c-11ea-8772-0eb0c05399f8.png)
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to