|
@@ -1,17 +1,16 @@
|
|
|
package me.chanjar.weixin.mp.api;
|
|
|
|
|
|
-import java.util.concurrent.ExecutionException;
|
|
|
-import java.util.concurrent.ExecutorService;
|
|
|
-import java.util.concurrent.Executors;
|
|
|
-import java.util.concurrent.Future;
|
|
|
-
|
|
|
-import org.testng.annotations.DataProvider;
|
|
|
-import org.testng.annotations.Test;
|
|
|
-
|
|
|
import me.chanjar.weixin.common.bean.result.WxError;
|
|
|
import me.chanjar.weixin.common.exception.WxErrorException;
|
|
|
import me.chanjar.weixin.common.util.http.RequestExecutor;
|
|
|
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
|
|
|
+import org.testng.annotations.DataProvider;
|
|
|
+import org.testng.annotations.Test;
|
|
|
+
|
|
|
+import java.util.concurrent.ExecutionException;
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
+import java.util.concurrent.Executors;
|
|
|
+import java.util.concurrent.Future;
|
|
|
|
|
|
@Test
|
|
|
public class WxMpBusyRetryTest {
|
|
@@ -24,6 +23,7 @@ public class WxMpBusyRetryTest {
|
|
|
protected synchronized <T, E> T executeInternal(
|
|
|
RequestExecutor<T, E> executor, String uri, E data)
|
|
|
throws WxErrorException {
|
|
|
+ this.log.info("Executed");
|
|
|
WxError error = new WxError();
|
|
|
error.setErrorCode(-1);
|
|
|
throw new WxErrorException(error);
|
|
@@ -32,9 +32,7 @@ public class WxMpBusyRetryTest {
|
|
|
|
|
|
service.setMaxRetryTimes(3);
|
|
|
service.setRetrySleepMillis(500);
|
|
|
- return new Object[][] {
|
|
|
- new Object[] { service }
|
|
|
- };
|
|
|
+ return new Object[][] { { service } };
|
|
|
}
|
|
|
|
|
|
@Test(dataProvider = "getService", expectedExceptions = RuntimeException.class)
|