mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
修复小l字符问题
This commit is contained in:
parent
0714cbe8e2
commit
cae504b6bd
@ -192,7 +192,7 @@ public class StandardSessionManager implements WxSessionManager, InternalSession
|
|||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
// 每秒清理一次
|
// 每秒清理一次
|
||||||
Thread.sleep(StandardSessionManager.this.backgroundProcessorDelay * 1000l);
|
Thread.sleep(StandardSessionManager.this.backgroundProcessorDelay * 1000L);
|
||||||
backgroundProcess();
|
backgroundProcess();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
StandardSessionManager.this.log.error("SessionManagerImpl.backgroundProcess error", e);
|
StandardSessionManager.this.log.error("SessionManagerImpl.backgroundProcess error", e);
|
||||||
|
@ -77,7 +77,7 @@ public class GsonHelper {
|
|||||||
|
|
||||||
public static long getAsPrimitiveLong(JsonElement element) {
|
public static long getAsPrimitiveLong(JsonElement element) {
|
||||||
Long r = getAsLong(element);
|
Long r = getAsLong(element);
|
||||||
return r == null ? 0l : r;
|
return r == null ? 0L : r;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Integer getAsInteger(JsonElement element) {
|
public static Integer getAsInteger(JsonElement element) {
|
||||||
|
@ -3,15 +3,17 @@ package me.chanjar.weixin.common.api;
|
|||||||
import org.testng.Assert;
|
import org.testng.Assert;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static org.testng.Assert.assertFalse;
|
import static org.testng.Assert.assertFalse;
|
||||||
import static org.testng.Assert.assertTrue;
|
import static org.testng.Assert.assertTrue;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public class WxMessageInMemoryDuplicateCheckerTest {
|
public class WxMessageInMemoryDuplicateCheckerTest {
|
||||||
private WxMessageInMemoryDuplicateChecker checker = new WxMessageInMemoryDuplicateChecker(2000l, 1000l);
|
private WxMessageInMemoryDuplicateChecker checker = new WxMessageInMemoryDuplicateChecker(2000L, 1000L);
|
||||||
|
|
||||||
public void test() throws InterruptedException {
|
public void test() throws InterruptedException {
|
||||||
Long[] msgIds = new Long[]{1l, 2l, 3l, 4l, 5l, 6l, 7l, 8l};
|
Long[] msgIds = new Long[]{1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L};
|
||||||
|
|
||||||
// 第一次检查
|
// 第一次检查
|
||||||
for (Long msgId : msgIds) {
|
for (Long msgId : msgIds) {
|
||||||
@ -20,14 +22,14 @@ public class WxMessageInMemoryDuplicateCheckerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 过1秒再检查
|
// 过1秒再检查
|
||||||
Thread.sleep(1000l);
|
TimeUnit.SECONDS.sleep(1);
|
||||||
for (Long msgId : msgIds) {
|
for (Long msgId : msgIds) {
|
||||||
boolean result = checker.isDuplicate(String.valueOf(msgId));
|
boolean result = checker.isDuplicate(String.valueOf(msgId));
|
||||||
assertTrue(result);
|
assertTrue(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 过1.5秒再检查
|
// 过1.5秒再检查
|
||||||
Thread.sleep(1500l);
|
TimeUnit.MILLISECONDS.sleep(1500L);
|
||||||
for (Long msgId : msgIds) {
|
for (Long msgId : msgIds) {
|
||||||
boolean result = checker.isDuplicate(String.valueOf(msgId));
|
boolean result = checker.isDuplicate(String.valueOf(msgId));
|
||||||
assertFalse(result);
|
assertFalse(result);
|
||||||
|
@ -80,7 +80,7 @@ public class SessionTest {
|
|||||||
InternalSession abc = ism.createSession("abc");
|
InternalSession abc = ism.createSession("abc");
|
||||||
abc.endAccess();
|
abc.endAccess();
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ public class SessionTest {
|
|||||||
abc.setMaxInactiveInterval(1);
|
abc.setMaxInactiveInterval(1);
|
||||||
abc.endAccess();
|
abc.endAccess();
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ public abstract class BaseBuilder<BuilderType, ValueType> {
|
|||||||
public void setCommon(WxCpXmlOutMessage m) {
|
public void setCommon(WxCpXmlOutMessage m) {
|
||||||
m.setToUserName(this.toUserName);
|
m.setToUserName(this.toUserName);
|
||||||
m.setFromUserName(this.fromUserName);
|
m.setFromUserName(this.fromUserName);
|
||||||
m.setCreateTime(System.currentTimeMillis() / 1000l);
|
m.setCreateTime(System.currentTimeMillis() / 1000L);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public class WxCpInMemoryConfigStorage implements WxCpConfigStorage {
|
|||||||
@Override
|
@Override
|
||||||
public synchronized void updateAccessToken(String accessToken, int expiresInSeconds) {
|
public synchronized void updateAccessToken(String accessToken, int expiresInSeconds) {
|
||||||
this.accessToken = accessToken;
|
this.accessToken = accessToken;
|
||||||
this.expiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000l;
|
this.expiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -92,7 +92,7 @@ public class WxCpInMemoryConfigStorage implements WxCpConfigStorage {
|
|||||||
public synchronized void updateJsapiTicket(String jsapiTicket, int expiresInSeconds) {
|
public synchronized void updateJsapiTicket(String jsapiTicket, int expiresInSeconds) {
|
||||||
this.jsapiTicket = jsapiTicket;
|
this.jsapiTicket = jsapiTicket;
|
||||||
// 预留200秒的时间
|
// 预留200秒的时间
|
||||||
this.jsapiTicketExpiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000l;
|
this.jsapiTicketExpiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -69,7 +69,7 @@ public class WxCpMessageRouterTest {
|
|||||||
WxCpMessageRouter router = new WxCpMessageRouter(null);
|
WxCpMessageRouter router = new WxCpMessageRouter(null);
|
||||||
prepare(true, sb, router);
|
prepare(true, sb, router);
|
||||||
router.route(message);
|
router.route(message);
|
||||||
Thread.sleep(500l);
|
Thread.sleep(500);
|
||||||
Assert.assertEquals(sb.toString(), expected);
|
Assert.assertEquals(sb.toString(), expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ public class WxCpMessageRouterTest {
|
|||||||
public void run() {
|
public void run() {
|
||||||
router.route(m);
|
router.route(m);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000l);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ public class WxCpMessageRouterTest {
|
|||||||
new Thread(r).start();
|
new Thread(r).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread.sleep(1000l * 2);
|
Thread.sleep(2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DataProvider(name = "messages-1")
|
@DataProvider(name = "messages-1")
|
||||||
@ -184,7 +184,7 @@ public class WxCpMessageRouterTest {
|
|||||||
msg.setFromUserName("abc");
|
msg.setFromUserName("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ public class WxCpMessageRouterTest {
|
|||||||
msg.setFromUserName("abc");
|
msg.setFromUserName("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -218,7 +218,7 @@ public class WxCpMessageRouterTest {
|
|||||||
msg.setFromUserName("abc");
|
msg.setFromUserName("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ public class WxCpMessageRouterTest {
|
|||||||
msg.setFromUserName("abc");
|
msg.setFromUserName("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ public class WxCpMessageRouterTest {
|
|||||||
msg.setFromUserName("abc");
|
msg.setFromUserName("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ public class WxCpMessageRouterTest {
|
|||||||
msg.setFromUserName("abc");
|
msg.setFromUserName("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,10 +57,10 @@ public class WxCpXmlMessageTest {
|
|||||||
WxCpXmlMessage wxMessage = WxCpXmlMessage.fromXml(xml);
|
WxCpXmlMessage wxMessage = WxCpXmlMessage.fromXml(xml);
|
||||||
assertEquals(wxMessage.getToUserName(), "toUser");
|
assertEquals(wxMessage.getToUserName(), "toUser");
|
||||||
assertEquals(wxMessage.getFromUserName(), "fromUser");
|
assertEquals(wxMessage.getFromUserName(), "fromUser");
|
||||||
assertEquals(wxMessage.getCreateTime(), new Long(1348831860l));
|
assertEquals(wxMessage.getCreateTime(), new Long(1348831860));
|
||||||
assertEquals(wxMessage.getMsgType(), WxConsts.XmlMsgType.TEXT);
|
assertEquals(wxMessage.getMsgType(), WxConsts.XmlMsgType.TEXT);
|
||||||
assertEquals(wxMessage.getContent(), "this is a test");
|
assertEquals(wxMessage.getContent(), "this is a test");
|
||||||
assertEquals(wxMessage.getMsgId(), new Long(1234567890123456l));
|
assertEquals(wxMessage.getMsgId(), new Long(1234567890123456L));
|
||||||
assertEquals(wxMessage.getPicUrl(), "this is a url");
|
assertEquals(wxMessage.getPicUrl(), "this is a url");
|
||||||
assertEquals(wxMessage.getMediaId(), "media_id");
|
assertEquals(wxMessage.getMediaId(), "media_id");
|
||||||
assertEquals(wxMessage.getFormat(), "Format");
|
assertEquals(wxMessage.getFormat(), "Format");
|
||||||
@ -80,7 +80,7 @@ public class WxCpXmlMessageTest {
|
|||||||
assertEquals(wxMessage.getPrecision(), 119.385040);
|
assertEquals(wxMessage.getPrecision(), 119.385040);
|
||||||
assertEquals(wxMessage.getScanCodeInfo().getScanType(), "qrcode");
|
assertEquals(wxMessage.getScanCodeInfo().getScanType(), "qrcode");
|
||||||
assertEquals(wxMessage.getScanCodeInfo().getScanResult(), "1");
|
assertEquals(wxMessage.getScanCodeInfo().getScanResult(), "1");
|
||||||
assertEquals(wxMessage.getSendPicsInfo().getCount(), new Long(1l));
|
assertEquals(wxMessage.getSendPicsInfo().getCount(), new Long(1));
|
||||||
assertEquals(wxMessage.getSendPicsInfo().getPicList().get(0).getPicMd5Sum(), "1b5f7c23b5bf75682a53e7b6d163e185");
|
assertEquals(wxMessage.getSendPicsInfo().getPicList().get(0).getPicMd5Sum(), "1b5f7c23b5bf75682a53e7b6d163e185");
|
||||||
assertEquals(wxMessage.getSendLocationInfo().getLocationX(), "23");
|
assertEquals(wxMessage.getSendLocationInfo().getLocationX(), "23");
|
||||||
assertEquals(wxMessage.getSendLocationInfo().getLocationY(), "113");
|
assertEquals(wxMessage.getSendLocationInfo().getLocationY(), "113");
|
||||||
|
@ -9,7 +9,7 @@ public class WxCpXmlOutImageMessageTest {
|
|||||||
public void test() {
|
public void test() {
|
||||||
WxCpXmlOutImageMessage m = new WxCpXmlOutImageMessage();
|
WxCpXmlOutImageMessage m = new WxCpXmlOutImageMessage();
|
||||||
m.setMediaId("ddfefesfsdfef");
|
m.setMediaId("ddfefesfsdfef");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("from");
|
m.setFromUserName("from");
|
||||||
m.setToUserName("to");
|
m.setToUserName("to");
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ public class WxCpXmlOutNewsMessageTest {
|
|||||||
|
|
||||||
public void test() {
|
public void test() {
|
||||||
WxCpXmlOutNewsMessage m = new WxCpXmlOutNewsMessage();
|
WxCpXmlOutNewsMessage m = new WxCpXmlOutNewsMessage();
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("fromUser");
|
m.setFromUserName("fromUser");
|
||||||
m.setToUserName("toUser");
|
m.setToUserName("toUser");
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ public class WxCpXmlOutTextMessageTest {
|
|||||||
public void test() {
|
public void test() {
|
||||||
WxCpXmlOutTextMessage m = new WxCpXmlOutTextMessage();
|
WxCpXmlOutTextMessage m = new WxCpXmlOutTextMessage();
|
||||||
m.setContent("content");
|
m.setContent("content");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("from");
|
m.setFromUserName("from");
|
||||||
m.setToUserName("to");
|
m.setToUserName("to");
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ public class WxCpXmlOutVideoMessageTest {
|
|||||||
m.setMediaId("media_id");
|
m.setMediaId("media_id");
|
||||||
m.setTitle("title");
|
m.setTitle("title");
|
||||||
m.setDescription("ddfff");
|
m.setDescription("ddfff");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("fromUser");
|
m.setFromUserName("fromUser");
|
||||||
m.setToUserName("toUser");
|
m.setToUserName("toUser");
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ public class WxCpXmlOutVoiceMessageTest {
|
|||||||
public void test() {
|
public void test() {
|
||||||
WxCpXmlOutVoiceMessage m = new WxCpXmlOutVoiceMessage();
|
WxCpXmlOutVoiceMessage m = new WxCpXmlOutVoiceMessage();
|
||||||
m.setMediaId("ddfefesfsdfef");
|
m.setMediaId("ddfefesfsdfef");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("from");
|
m.setFromUserName("from");
|
||||||
m.setToUserName("to");
|
m.setToUserName("to");
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public abstract class BaseBuilder<BuilderType, ValueType> {
|
|||||||
public void setCommon(WxMpXmlOutMessage m) {
|
public void setCommon(WxMpXmlOutMessage m) {
|
||||||
m.setToUserName(this.toUserName);
|
m.setToUserName(this.toUserName);
|
||||||
m.setFromUserName(this.fromUserName);
|
m.setFromUserName(this.fromUserName);
|
||||||
m.setCreateTime(System.currentTimeMillis() / 1000l);
|
m.setCreateTime(System.currentTimeMillis() / 1000L);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ public class WxMpJsAPITest {
|
|||||||
|
|
||||||
|
|
||||||
public void test() {
|
public void test() {
|
||||||
long timestamp = 1419835025l;
|
long timestamp = 1419835025L;
|
||||||
String url = "http://omstest.vmall.com:23568/thirdparty/wechat/vcode/gotoshare?quantity=1&batchName=MATE7";
|
String url = "http://omstest.vmall.com:23568/thirdparty/wechat/vcode/gotoshare?quantity=1&batchName=MATE7";
|
||||||
String noncestr = "82693e11-b9bc-448e-892f-f5289f46cd0f";
|
String noncestr = "82693e11-b9bc-448e-892f-f5289f46cd0f";
|
||||||
String jsapiTicket = "bxLdikRXVbTPdHSM05e5u4RbEYQn7pNQMPrfzl8lJNb1foLDa3HIwI3BRMkQmSO_5F64VFa75uURcq6Uz7QHgA";
|
String jsapiTicket = "bxLdikRXVbTPdHSM05e5u4RbEYQn7pNQMPrfzl8lJNb1foLDa3HIwI3BRMkQmSO_5F64VFa75uURcq6Uz7QHgA";
|
||||||
|
@ -66,7 +66,7 @@ public class WxMpMessageRouterTest {
|
|||||||
WxMpMessageRouter router = new WxMpMessageRouter(null);
|
WxMpMessageRouter router = new WxMpMessageRouter(null);
|
||||||
prepare(true, sb, router);
|
prepare(true, sb, router);
|
||||||
router.route(message);
|
router.route(message);
|
||||||
Thread.sleep(500l);
|
Thread.sleep(500);
|
||||||
Assert.assertEquals(sb.toString(), expected);
|
Assert.assertEquals(sb.toString(), expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ public class WxMpMessageRouterTest {
|
|||||||
public void run() {
|
public void run() {
|
||||||
router.route(m);
|
router.route(m);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000l);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ public class WxMpMessageRouterTest {
|
|||||||
new Thread(r).start();
|
new Thread(r).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread.sleep(1000l * 2);
|
Thread.sleep(2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DataProvider(name = "messages-1")
|
@DataProvider(name = "messages-1")
|
||||||
@ -180,7 +180,7 @@ public class WxMpMessageRouterTest {
|
|||||||
msg.setFromUser("abc");
|
msg.setFromUser("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ public class WxMpMessageRouterTest {
|
|||||||
msg.setFromUser("abc");
|
msg.setFromUser("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -214,7 +214,7 @@ public class WxMpMessageRouterTest {
|
|||||||
msg.setFromUser("abc");
|
msg.setFromUser("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ public class WxMpMessageRouterTest {
|
|||||||
msg.setFromUser("abc");
|
msg.setFromUser("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ public class WxMpMessageRouterTest {
|
|||||||
msg.setFromUser("abc");
|
msg.setFromUser("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ public class WxMpMessageRouterTest {
|
|||||||
msg.setFromUser("abc");
|
msg.setFromUser("abc");
|
||||||
router.route(msg);
|
router.route(msg);
|
||||||
|
|
||||||
Thread.sleep(2000l);
|
Thread.sleep(2000);
|
||||||
Assert.assertEquals(ism.getActiveSessions(), 0);
|
Assert.assertEquals(ism.getActiveSessions(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ public class WxMpXmlOutImageMessageTest {
|
|||||||
public void test() {
|
public void test() {
|
||||||
WxMpXmlOutImageMessage m = new WxMpXmlOutImageMessage();
|
WxMpXmlOutImageMessage m = new WxMpXmlOutImageMessage();
|
||||||
m.setMediaId("ddfefesfsdfef");
|
m.setMediaId("ddfefesfsdfef");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("from");
|
m.setFromUserName("from");
|
||||||
m.setToUserName("to");
|
m.setToUserName("to");
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ public class WxMpXmlOutNewsMessageTest {
|
|||||||
|
|
||||||
public void test() {
|
public void test() {
|
||||||
WxMpXmlOutNewsMessage m = new WxMpXmlOutNewsMessage();
|
WxMpXmlOutNewsMessage m = new WxMpXmlOutNewsMessage();
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("fromUser");
|
m.setFromUserName("fromUser");
|
||||||
m.setToUserName("toUser");
|
m.setToUserName("toUser");
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ public class WxMpXmlOutTextMessageTest {
|
|||||||
public void test() {
|
public void test() {
|
||||||
WxMpXmlOutTextMessage m = new WxMpXmlOutTextMessage();
|
WxMpXmlOutTextMessage m = new WxMpXmlOutTextMessage();
|
||||||
m.setContent("content");
|
m.setContent("content");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("from");
|
m.setFromUserName("from");
|
||||||
m.setToUserName("to");
|
m.setToUserName("to");
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ public class WxMpXmlOutVideoMessageTest {
|
|||||||
m.setMediaId("media_id");
|
m.setMediaId("media_id");
|
||||||
m.setTitle("title");
|
m.setTitle("title");
|
||||||
m.setDescription("ddfff");
|
m.setDescription("ddfff");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("fromUser");
|
m.setFromUserName("fromUser");
|
||||||
m.setToUserName("toUser");
|
m.setToUserName("toUser");
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ public class WxMpXmlOutVoiceMessageTest {
|
|||||||
public void test() {
|
public void test() {
|
||||||
WxMpXmlOutVoiceMessage m = new WxMpXmlOutVoiceMessage();
|
WxMpXmlOutVoiceMessage m = new WxMpXmlOutVoiceMessage();
|
||||||
m.setMediaId("ddfefesfsdfef");
|
m.setMediaId("ddfefesfsdfef");
|
||||||
m.setCreateTime(1122l);
|
m.setCreateTime(1122L);
|
||||||
m.setFromUserName("from");
|
m.setFromUserName("from");
|
||||||
m.setToUserName("to");
|
m.setToUserName("to");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user