This is an automated email from the ASF dual-hosted git repository.

zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git


The following commit(s) were added to refs/heads/master by this push:
     new e41e1a983 Fix error message occur in spring test cases
     new 92449f048 Merge pull request #2352 from terrymanu/dev
e41e1a983 is described below

commit e41e1a983f4a77b27b478223cedf40e9d4b0b834
Author: zhangliang <[email protected]>
AuthorDate: Tue Oct 31 18:08:20 2023 +0800

    Fix error message occur in spring test cases
---
 .../namespace/fixture/listener/SimpleOnceListener.java | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git 
a/spring/namespace/src/test/java/org/apache/shardingsphere/elasticjob/spring/namespace/fixture/listener/SimpleOnceListener.java
 
b/spring/namespace/src/test/java/org/apache/shardingsphere/elasticjob/spring/namespace/fixture/listener/SimpleOnceListener.java
index 4e75613eb..c4a2d7eed 100644
--- 
a/spring/namespace/src/test/java/org/apache/shardingsphere/elasticjob/spring/namespace/fixture/listener/SimpleOnceListener.java
+++ 
b/spring/namespace/src/test/java/org/apache/shardingsphere/elasticjob/spring/namespace/fixture/listener/SimpleOnceListener.java
@@ -17,37 +17,27 @@
 
 package org.apache.shardingsphere.elasticjob.spring.namespace.fixture.listener;
 
-import 
org.apache.shardingsphere.elasticjob.spi.listener.param.ShardingContexts;
 import 
org.apache.shardingsphere.elasticjob.kernel.listener.AbstractDistributeOnceElasticJobListener;
-import 
org.apache.shardingsphere.elasticjob.spring.namespace.fixture.service.FooService;
-import org.springframework.beans.factory.annotation.Autowired;
+import 
org.apache.shardingsphere.elasticjob.spi.listener.param.ShardingContexts;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 
 public class SimpleOnceListener extends 
AbstractDistributeOnceElasticJobListener {
     
-    @Autowired
-    private FooService fooService;
-    
     private final long startedTimeoutMilliseconds;
     
     private final long completedTimeoutMilliseconds;
     
     public SimpleOnceListener() {
-        this(10000, 20000);
-    }
-    
-    public SimpleOnceListener(final long startedTimeoutMilliseconds, final 
long completedTimeoutMilliseconds) {
-        super(startedTimeoutMilliseconds, completedTimeoutMilliseconds);
-        this.startedTimeoutMilliseconds = startedTimeoutMilliseconds;
-        this.completedTimeoutMilliseconds = completedTimeoutMilliseconds;
+        super(10000L, 20000L);
+        startedTimeoutMilliseconds = 10000L;
+        completedTimeoutMilliseconds = 20000L;
     }
     
     @Override
     public void doBeforeJobExecutedAtLastStarted(final ShardingContexts 
shardingContexts) {
         assertThat(startedTimeoutMilliseconds, is(10000L));
-        assertThat(fooService.foo(), is("this is fooService."));
     }
     
     @Override

Reply via email to