Commit 7cd2d0c1 authored by 钱雯君's avatar 钱雯君

add

parent c3eee2f3
......@@ -111,7 +111,7 @@ public class pk_开奖_瓜分红包_押注人数不同测试_PkTest extends Duib
Thread.sleep(8000);
//校验点
//1、pk活动表配置的状态更新为4;2、订单表的addCredits字段为瓜分的红包值;3、先押注 的选项为胜方,胜负的额押注人数>负方的押注人数
//1、pk活动表配置的状态更新为4;2、订单表的addCredits字段为瓜分的红包值;3、先押注 的选项为胜方,胜负的额押注人数>负方的押注人数,4、校验account表的红包值加上去
Map<String,Object> betConfig = jdbc.findSimpleResult("select * from act_com_conf.tb_bet_config where id = ?",newBetId);
logger.info("betConfig的信息为:"+ JSONObject.toJSONString(betConfig));
Assert.assertEquals(betConfig.get("config_status").toString(),"4","配置表状态更新失败");
......@@ -147,6 +147,8 @@ public class pk_开奖_瓜分红包_押注人数不同测试_PkTest extends Duib
Assert.assertTrue(bet1Times<bet2Times,"活动获胜人数比失败人数多校验失败");
logger.info("选项1的押注人数为:"+bet1Result.get("bet_times").toString()+",选项2的押注人数为:"+bet2Result.get("bet_times").toString());
Map<String,Object> user01_account = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0060 where consumer_id = '100066364' and duiba_activity_id = ?\n",newBetId);
}catch (Exception e){
......@@ -207,21 +209,16 @@ public class pk_开奖_瓜分红包_押注人数不同测试_PkTest extends Duib
// @AfterClass
@AfterClass
public void tearDown() {
try {
//调用开奖接口
Response doDrowRresponse = pkActivityService.doDraw();
Assert.assertEquals(doDrowRresponse.jsonPath().getString("success"),"true","开奖结果校验失败");
Assert.assertEquals(doDrowRresponse.jsonPath().getString("data"),"开奖中。。。","开奖messag校验失败");
Thread.sleep(8000);
// Boolean result1 = jdbc.update("delete from act_com_conf.tb_bet_option where bet_id in (select id from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包')");
// Boolean result2 = jdbc.update("delete from act_com_conf.tb_bet_group_relation where bet_id in (select id from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包')");
// Boolean result3 = jdbc.update("delete from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包'");
// Boolean result4 = jdbc.update("delete from act_record.tb_bet_record where bet_id in (select id from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包')");
Boolean result1 = jdbc.update("delete from act_com_conf.tb_bet_option where bet_id in (select id from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包')");
Boolean result2 = jdbc.update("delete from act_com_conf.tb_bet_group_relation where bet_id in (select id from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包')");
Boolean result3 = jdbc.update("delete from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包'");
Boolean result4 = jdbc.update("delete from act_record.tb_bet_record where bet_id in (select id from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包')");
......
......@@ -20,6 +20,7 @@ import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import utils.MatcherString;
......@@ -169,17 +170,12 @@ public class pk_开奖_瓜分红包_押注人数相同测试_PkTest extends Duib
}
// @AfterClass
@AfterClass
public void tearDown() {
try {
//调用开奖接口
// Response doDrowRresponse = pkActivityService.doDraw();
// Assert.assertEquals(doDrowRresponse.jsonPath().getString("success"),"true","开奖结果校验失败");
// Assert.assertEquals(doDrowRresponse.jsonPath().getString("data"),"开奖中。。。","开奖messag校验失败");
// Thread.sleep(8000);
Boolean result1 = jdbc.update("delete from act_com_conf.tb_bet_option where bet_id in (select id from act_com_conf.tb_bet_config where title = '【自动化】新建pk活动-瓜分红包')");
......
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