MCPcopy Create free account
hub / github.com/e2wugui/zeze / verify

Method verify

ZezeJava/ZezeJavaTest/src/Infinite/Tasks.java:321–354  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 8

getInstanceMethod · 0.95
getTable1Method · 0.80
selectDirtyMethod · 0.65
containsMethod · 0.65
verifyMethod · 0.45
randAppMethod · 0.45
getMessageMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected