微服务交易测试实战指南
在构建和运行微服务示例时,我们需要完成一系列的准备工作和测试用例执行。以下将详细介绍整个过程。
1. 数据库表的初始化
首先,我们要确保数据库表是干净的,删除可能存在的同名表,并创建示例所需的表结构,具体操作如下:
ij> drop table stockuser;
ij> drop table stocktx;
ij> create table stockuser (id bigint not null, amountbought double,
amountsold double, createdat timestamp not null, lastquoteat timestamp, name
varchar(255) not null, updatedat timestamp not null, primary key (id));
ij> create table stocktx (id bigint generated by default as identity,
amount float not null, buyerid bigint not null, createdat timestamp not
null, quotecreated timestamp not null, quoteid bigint not null, sellerid
bigint not null, status varchar(255) not null, stocksymbol varchar(255) not
null, test integer, updated
超级会员免费看
订阅专栏 解锁全文
856

被折叠的 条评论
为什么被折叠?



