Commit 5edae75a authored by 马博's avatar 马博

加延时

parent f6b207e3
...@@ -90,11 +90,12 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -90,11 +90,12 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
} }
Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败"); Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败");
Thread.sleep(5000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId); Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
logger.info("商品兑换按钮:" + exchangeText); logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换 //第二次兑换
Thread.sleep(3000);
try{ try{
response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits); response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits);
response.prettyPrint(); response.prettyPrint();
...@@ -142,11 +143,12 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -142,11 +143,12 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
i--; i--;
} }
Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败"); Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败");
Thread.sleep(5000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId); Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
logger.info("商品兑换按钮:" + exchangeText); logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换 //第二次兑换
Thread.sleep(3000);
try{ try{
response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits); response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits);
logger.info("********2"); logger.info("********2");
...@@ -194,11 +196,11 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -194,11 +196,11 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
i--; i--;
} }
Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败"); Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败");
Thread.sleep(5000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId); Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
// logger.info("商品兑换按钮:" + exchangeText); // logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换 //第二次兑换
Thread.sleep(3000);
try{ try{
response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits); response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits);
response.prettyPrint(); response.prettyPrint();
...@@ -246,11 +248,11 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -246,11 +248,11 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
i--; i--;
} }
Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败"); Assert.assertEquals(status,"wait_delivery","校验轮询结果status失败");
Thread.sleep(5000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId); Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
// logger.info("商品兑换按钮:" + exchangeText); // logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换 //第二次兑换
Thread.sleep(3000);
try{ try{
response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits); response = gawService.objectExchange(uid,appItemId,itemId,skuId,credits,actualCredits);
response.prettyPrint(); response.prettyPrint();
...@@ -292,6 +294,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -292,6 +294,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
} }
logger.info(message); logger.info(message);
//获取按钮状态 //获取按钮状态
Thread.sleep(5000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId); Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
logger.info("商品兑换按钮:" + exchangeText); logger.info("商品兑换按钮:" + exchangeText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment