1
0
mirror of synced 2026-10-26 18:26:10 +08:00

: white_check_mark: 启用离线测试门禁并修复解析与测试配置问题

This commit is contained in:
Binary Wang
2026-09-13 12:06:07 +08:00
parent f95fd76b05
commit 1bcb7b3873
33 changed files with 346 additions and 197 deletions

View File

@@ -25,12 +25,13 @@ public class WxMpBusyRetryTest {
RequestExecutor<T, E> executor, String uri, E data)
throws WxErrorException {
log.info("Executed");
throw new WxErrorException("something");
throw new WxErrorException(me.chanjar.weixin.common.error.WxError.builder()
.errorCode(-1).errorMsg("system busy").build());
}
};
service.setMaxRetryTimes(3);
service.setRetrySleepMillis(500);
service.setRetrySleepMillis(1);
return new Object[][]{{service}};
}
@@ -51,7 +52,7 @@ public class WxMpBusyRetryTest {
} catch (WxErrorException e) {
throw new WxRuntimeException(e);
} catch (RuntimeException e) {
// OK
org.testng.Assert.assertTrue(e.getMessage().contains("超出重试次数"));
}
};
Future<?> submit1 = executorService.submit(runnable);

View File

@@ -1,10 +1,7 @@
package me.chanjar.weixin.qidian.api;
import com.google.inject.Inject;
import me.chanjar.weixin.common.util.crypto.SHA1;
import me.chanjar.weixin.qidian.api.test.ApiTestModule;
import org.testng.Assert;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
/**
@@ -13,12 +10,8 @@ import org.testng.annotations.Test;
* @author chanjarster
*/
@Test
@Guice(modules = ApiTestModule.class)
public class WxMpJsAPITest {
@Inject
protected WxQidianService wxService;
public void test() {
long timestamp = 1419835025L;
String url = "http://omstest.vmall.com:23568/thirdparty/wechat/vcode/gotoshare?quantity=1&batchName=MATE7";

View File

@@ -4,27 +4,7 @@
<test name="API_Test">
<classes>
<class name="me.chanjar.weixin.qidian.api.WxMpBusyRetryTest"/>
<class name="me.chanjar.weixin.qidian.api.WxMpBaseAPITest"/>
<class name="me.chanjar.weixin.qidian.api.impl.WxMpMassMessageServiceImplTest"/>
<class name="me.chanjar.weixin.qidian.api.impl.WxMpUserServiceImplTest"/>
<class name="me.chanjar.weixin.qidian.api.impl.WxMpQrcodeServiceImplTest"/>
<class name="me.chanjar.weixin.qidian.api.WxMpShortUrlAPITest"/>
<class name="me.chanjar.weixin.qidian.api.WxMpMessageRouterTest"/>
<class name="me.chanjar.weixin.qidian.api.WxMpJsAPITest"/>
<class name="me.chanjar.weixin.qidian.api.WxMpMiscAPITest"/>
</classes>
</test>
<test name="Bean_Test">
<classes>
<class name="me.chanjar.weixin.qidian.bean.kefu.WxMpKefuMessageTest"/>
<class name="me.chanjar.weixin.qidian.bean.message.WxMpXmlMessageTest"/>
<class name="me.chanjar.weixin.qidian.bean.message.WxMpXmlOutImageMessageTest"/>
<class name="me.chanjar.weixin.qidian.bean.message.WxMpXmlOutMusicMessageTest"/>
<class name="me.chanjar.weixin.qidian.bean.message.WxMpXmlOutNewsMessageTest"/>
<class name="me.chanjar.weixin.qidian.bean.message.WxMpXmlOutVideoMessageTest"/>
<class name="me.chanjar.weixin.qidian.bean.message.WxMpXmlOutVoiceMessageTest"/>
<class name="me.chanjar.weixin.qidian.bean.message.WxMpXmlOutTextMessageTest"/>
</classes>
</test>
</suite>