提交 8bbea65c authored 作者: Andrei Tokar's avatar Andrei Tokar

exercise all cases within a switch

上级 14f69a1c
...@@ -69,7 +69,7 @@ public class TestConcurrentUpdate extends TestBase { ...@@ -69,7 +69,7 @@ public class TestConcurrentUpdate extends TestBase {
while (!stop) { while (!stop) {
int x = r.nextInt(ROW_COUNT); int x = r.nextInt(ROW_COUNT);
String data = "x" + r.nextInt(ROW_COUNT); String data = "x" + r.nextInt(ROW_COUNT);
switch (r.nextInt(3)) { switch (r.nextInt(4)) {
case 0: case 0:
insert.setInt(1, x); insert.setInt(1, x);
insert.setString(2, data); insert.setString(2, data);
...@@ -84,7 +84,7 @@ public class TestConcurrentUpdate extends TestBase { ...@@ -84,7 +84,7 @@ public class TestConcurrentUpdate extends TestBase {
delete.setInt(1, x); delete.setInt(1, x);
delete.execute(); delete.execute();
break; break;
case 4: case 3:
select.setInt(1, x); select.setInt(1, x);
ResultSet rs = select.executeQuery(); ResultSet rs = select.executeQuery();
while (rs.next()) { while (rs.next()) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论