()
| 319 | } |
| 320 | |
| 321 | @Override |
| 322 | void verify() throws Exception { |
| 323 | super.verify(); |
| 324 | |
| 325 | var app = Simulate.getInstance().randApp().app; // 任何一个app都能查到相同的结果。 |
| 326 | long sum = 0; |
| 327 | for (int key = 0; key < KeyBoundTrade; key++) { |
| 328 | for (int tryCount = 10; ; ) { |
| 329 | try { |
| 330 | try { |
| 331 | var value = app.demo_Module1.getTable1().selectDirty((long)key); |
| 332 | if (value != null) |
| 333 | sum += value.getInt_1(); |
| 334 | } catch (IllegalStateException e) { |
| 335 | if (e.getMessage() != null && e.getMessage().contains("Acquire Failed")) |
| 336 | key--; // retry |
| 337 | else |
| 338 | throw e; |
| 339 | } |
| 340 | break; |
| 341 | } catch (GoBackZeze e) { |
| 342 | if (--tryCount <= 0) |
| 343 | throw e; |
| 344 | try { |
| 345 | //noinspection BusyWait |
| 346 | Thread.sleep(200); |
| 347 | } catch (InterruptedException ex) { |
| 348 | throw new RuntimeException(ex); |
| 349 | } |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | Assert.assertEquals(0, sum); |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | static class tflushInt1TradeConcurrentVerify extends Task { |
nothing calls this directly
no test coverage detected