11package me .chanjar .weixin .mp .api ;
22
3- import me .chanjar .weixin .common .bean .result .WxError ;
4- import me .chanjar .weixin .common .exception .WxErrorException ;
5- import me .chanjar .weixin .common .util .http .RequestExecutor ;
6- import me .chanjar .weixin .mp .api .impl .WxMpServiceImpl ;
7- import org .testng .annotations .DataProvider ;
8- import org .testng .annotations .Test ;
9-
103import java .util .concurrent .ExecutionException ;
114import java .util .concurrent .ExecutorService ;
125import java .util .concurrent .Executors ;
136import java .util .concurrent .Future ;
147
8+ import org .testng .annotations .DataProvider ;
9+ import org .testng .annotations .Test ;
10+
11+ import me .chanjar .weixin .common .bean .result .WxError ;
12+ import me .chanjar .weixin .common .exception .WxErrorException ;
13+ import me .chanjar .weixin .common .util .http .RequestExecutor ;
14+ import me .chanjar .weixin .mp .api .impl .WxMpServiceImpl ;
15+
1516@ Test
1617public class WxMpBusyRetryTest {
1718
@@ -20,7 +21,9 @@ public Object[][] getService() {
2021 WxMpService service = new WxMpServiceImpl () {
2122
2223 @ Override
23- protected <T , E > T executeInternal (RequestExecutor <T , E > executor , String uri , E data ) throws WxErrorException {
24+ protected synchronized <T , E > T executeInternal (
25+ RequestExecutor <T , E > executor , String uri , E data )
26+ throws WxErrorException {
2427 WxError error = new WxError ();
2528 error .setErrorCode (-1 );
2629 throw new WxErrorException (error );
0 commit comments