4 import java.util.ArrayList;
14 public static final int NUMBER_OF_TESTS = 2;
16 public static void main(String[] args) throws ServerException {
17 if (args[0].equals("2")) {
19 } else if (args[0].equals("3")) {
21 } else if (args[0].equals("4")) {
23 } else if (args[0].equals("5")) {
25 } else if (args[0].equals("6")) {
27 } else if (args[0].equals("7")) {
29 } else if (args[0].equals("8")) {
31 } else if (args[0].equals("9")) {
33 } else if (args[0].equals("10")) {
35 } else if (args[0].equals("11")) {
37 } else if (args[0].equals("12")) {
39 } else if (args[0].equals("13")) {
43 else if (args[0].equals("14")) {
49 static void test14() throws ServerException {
50 TimingSingleton timer = TimingSingleton.getInstance();
52 boolean foundError = false;
55 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
57 // Setup the 2 clients
58 startTime = System.nanoTime();
59 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
61 System.out.println("T1 Ready");
62 endTime = System.nanoTime();
63 long keysPrep = endTime - startTime;
65 long initTimeNet = timer.getTime();
68 System.out.println("Setting up keys");
69 startTime = System.nanoTime();
70 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
71 System.out.println(i);
73 IoTString ia = new IoTString(a);
74 t1.createNewKey(ia, 321);
76 endTime = System.nanoTime();
77 long keysDt = endTime - startTime;
78 long keysNet = timer.getTime() - initTimeNet;
80 System.out.println("Total Preparation Time: " + keysPrep / 1000000);
81 System.out.println("Total Key Create Time Network: " + keysNet / 1000000);
82 System.out.println("Total Key Create Time no Network: " + (keysDt - keysNet) / 1000000);
90 static void test13() throws ServerException {
91 TimingSingleton timer = TimingSingleton.getInstance();
93 boolean foundError = false;
96 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
98 // Setup the 2 clients
99 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
101 System.out.println("T1 Ready");
103 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
105 System.out.println("T2 Ready");
109 long initTimeNet = timer.getTime();
113 System.out.println("Setting up keys");
114 startTime = System.nanoTime();
115 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
116 System.out.println(i);
121 IoTString ia = new IoTString(a);
122 IoTString ib = new IoTString(b);
123 IoTString ic = new IoTString(c);
124 IoTString id = new IoTString(d);
125 t1.createNewKey(ia, 351);
126 t1.createNewKey(ib, 351);
127 t2.createNewKey(ic, 321);
128 t2.createNewKey(id, 321);
130 endTime = System.nanoTime();
131 long keysDt = endTime - startTime;
132 long keysNet = timer.getTime() - initTimeNet;
134 // Do Updates for the keys
135 System.out.println("Setting Key-Values...");
136 startTime = System.nanoTime();
137 for (int t = 0; t < 1; t++) {
138 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
139 System.out.println(i);
140 String keyA = "a" + i;
141 String keyB = "b" + i;
142 String keyC = "c" + i;
143 String keyD = "d" + i;
144 String valueA = "a" + i;
145 String valueB = "b" + i;
146 String valueC = "c" + i;
147 String valueD = "d" + i;
149 IoTString iKeyA = new IoTString(keyA);
150 IoTString iKeyB = new IoTString(keyB);
151 IoTString iKeyC = new IoTString(keyC);
152 IoTString iKeyD = new IoTString(keyD);
153 IoTString iValueA = new IoTString(valueA);
154 IoTString iValueB = new IoTString(valueB);
155 IoTString iValueC = new IoTString(valueC);
156 IoTString iValueD = new IoTString(valueD);
159 t1.startTransaction();
160 t1.addKV(iKeyA, iValueA);
161 transStatusList.add(t1.commitTransaction());
163 t1.startTransaction();
164 t1.addKV(iKeyB, iValueB);
165 transStatusList.add(t1.commitTransaction());
167 t2.startTransaction();
168 t2.addKV(iKeyC, iValueC);
169 transStatusList.add(t2.commitTransaction());
171 t2.startTransaction();
172 t2.addKV(iKeyD, iValueD);
173 transStatusList.add(t2.commitTransaction());
177 endTime = System.nanoTime();
178 long writesDt = endTime - startTime;
179 long writesNet = timer.getTime() - keysNet - initTimeNet;
181 System.out.println("Updating Clients...");
182 startTime = System.nanoTime();
185 endTime = System.nanoTime();
186 long updatesDt = endTime - startTime;
187 long updatesNet = timer.getTime() - keysNet - writesNet - initTimeNet;
190 System.out.println("Total Key Create Time: " + keysDt / 1000000);
191 System.out.println("Total Key Create Time Network: " + keysNet / 1000000);
192 System.out.println("Total Key Create Time no Network: " + (keysDt - keysNet) / 1000000);
193 System.out.println();
194 System.out.println("Total write Time: " + writesDt / 1000000);
195 System.out.println("Total write Time Network: " + writesNet / 1000000);
196 System.out.println("Total write Time no Network: " + (writesDt - writesNet) / 1000000);
197 System.out.println();
198 System.out.println("Total updates Time: " + updatesDt / 1000000);
199 System.out.println("Total updates Time Network: " + updatesNet / 1000000);
200 System.out.println("Total updates Time no Network: " + (updatesDt - updatesNet) / 1000000);
204 static void test12() throws ServerException {
205 TimingSingleton timer = TimingSingleton.getInstance();
207 boolean foundError = false;
210 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
212 // Setup the 2 clients
213 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
215 System.out.println("T1 Ready");
217 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
219 System.out.println("T2 Ready");
222 long initTimeNet = timer.getTime();
226 System.out.println("Setting up keys");
227 startTime = System.nanoTime();
228 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
229 System.out.println(i);
234 IoTString ia = new IoTString(a);
235 IoTString ib = new IoTString(b);
236 IoTString ic = new IoTString(c);
237 IoTString id = new IoTString(d);
238 t1.createNewKey(ia, 321);
239 t1.createNewKey(ib, 321);
240 t2.createNewKey(ic, 351);
241 t2.createNewKey(id, 351);
243 endTime = System.nanoTime();
244 long keysDt = endTime - startTime;
245 long keysNet = timer.getTime() - initTimeNet;
247 // Do Updates for the keys
248 System.out.println("Setting Key-Values...");
249 startTime = System.nanoTime();
250 for (int t = 0; t < 3; t++) {
251 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
252 System.out.println(i);
253 String keyA = "a" + i;
254 String keyB = "b" + i;
255 String keyC = "c" + i;
256 String keyD = "d" + i;
257 String valueA = "a" + i;
258 String valueB = "b" + i;
259 String valueC = "c" + i;
260 String valueD = "d" + i;
262 IoTString iKeyA = new IoTString(keyA);
263 IoTString iKeyB = new IoTString(keyB);
264 IoTString iKeyC = new IoTString(keyC);
265 IoTString iKeyD = new IoTString(keyD);
266 IoTString iValueA = new IoTString(valueA);
267 IoTString iValueB = new IoTString(valueB);
268 IoTString iValueC = new IoTString(valueC);
269 IoTString iValueD = new IoTString(valueD);
272 t1.startTransaction();
273 t1.addKV(iKeyA, iValueA);
274 transStatusList.add(t1.commitTransaction());
276 t1.startTransaction();
277 t1.addKV(iKeyB, iValueB);
278 transStatusList.add(t1.commitTransaction());
280 t2.startTransaction();
281 t2.addKV(iKeyC, iValueC);
282 transStatusList.add(t2.commitTransaction());
284 t2.startTransaction();
285 t2.addKV(iKeyD, iValueD);
286 transStatusList.add(t2.commitTransaction());
290 endTime = System.nanoTime();
291 long writesDt = endTime - startTime;
292 long writesNet = timer.getTime() - keysNet - initTimeNet;
294 System.out.println("Updating Clients...");
295 startTime = System.nanoTime();
298 endTime = System.nanoTime();
299 long updatesDt = endTime - startTime;
300 long updatesNet = timer.getTime() - keysNet - writesNet - initTimeNet;
303 System.out.println("Total Key Create Time: " + keysDt / 1000000);
304 System.out.println("Total Key Create Time Network: " + keysNet / 1000000);
305 System.out.println("Total Key Create Time no Network: " + (keysDt - keysNet) / 1000000);
306 System.out.println();
307 System.out.println("Total write Time: " + writesDt / 1000000);
308 System.out.println("Total write Time Network: " + writesNet / 1000000);
309 System.out.println("Total write Time no Network: " + (writesDt - writesNet) / 1000000);
310 System.out.println();
311 System.out.println("Total updates Time: " + updatesDt / 1000000);
312 System.out.println("Total updates Time Network: " + updatesNet / 1000000);
313 System.out.println("Total updates Time no Network: " + (updatesDt - updatesNet) / 1000000);
317 static void test11() {
319 boolean foundError = false;
320 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
322 // Setup the 2 clients
323 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
325 System.out.println("Init Table t1s");
331 } catch (Exception e) { }
335 System.out.println("Update Table t2");
336 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
337 while (t2.update() == false) {}
340 System.out.println("Setting up keys");
341 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
342 System.out.println(i);
348 IoTString ia = new IoTString(a);
349 IoTString ib = new IoTString(b);
350 IoTString ic = new IoTString(c);
351 IoTString id = new IoTString(d);
355 t1.createNewKey(ia, 321);
357 } catch (Exception e) { }
362 t1.createNewKey(ib, 351);
364 } catch (Exception e) { }
369 t2.createNewKey(ic, 321);
371 } catch (Exception e) { }
376 t2.createNewKey(id, 351);
378 } catch (Exception e) { }
382 // Do Updates for the keys
383 System.out.println("Setting Key-Values...");
384 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
385 System.out.println(i);
386 String keyA = "a" + i;
387 String keyB = "b" + i;
388 String keyC = "c" + i;
389 String keyD = "d" + i;
390 String valueA = "a" + i;
391 String valueB = "b" + i;
392 String valueC = "c" + i;
393 String valueD = "d" + i;
395 IoTString iKeyA = new IoTString(keyA);
396 IoTString iKeyB = new IoTString(keyB);
397 IoTString iKeyC = new IoTString(keyC);
398 IoTString iKeyD = new IoTString(keyD);
399 IoTString iValueA = new IoTString(valueA);
400 IoTString iValueB = new IoTString(valueB);
401 IoTString iValueC = new IoTString(valueC);
402 IoTString iValueD = new IoTString(valueD);
405 String keyAPrev = "a" + (i - 1);
406 String keyBPrev = "b" + (i - 1);
407 String keyCPrev = "c" + (i - 1);
408 String keyDPrev = "d" + (i - 1);
409 String valueAPrev = "a" + (i - 1);
410 String valueBPrev = "b" + (i - 1);
411 String valueCPrev = "c" + (i - 1);
412 String valueDPrev = "d" + (i - 1);
414 IoTString iKeyAPrev = new IoTString(keyAPrev);
415 IoTString iKeyBPrev = new IoTString(keyBPrev);
416 IoTString iKeyCPrev = new IoTString(keyCPrev);
417 IoTString iKeyDPrev = new IoTString(keyDPrev);
418 IoTString iValueAPrev = new IoTString(valueAPrev);
419 IoTString iValueBPrev = new IoTString(valueBPrev);
420 IoTString iValueCPrev = new IoTString(valueCPrev);
421 IoTString iValueDPrev = new IoTString(valueDPrev);
424 System.out.println("t1 A");
425 t1.startTransaction();
426 t1.addKV(iKeyA, iValueA);
427 transStatusList.add(t1.commitTransaction());
429 System.out.println("t1 B");
430 t1.startTransaction();
431 t1.addKV(iKeyB, iValueB);
432 transStatusList.add(t1.commitTransaction());
434 System.out.println("t2 C");
435 t2.startTransaction();
436 t2.addKV(iKeyC, iValueC);
437 transStatusList.add(t2.commitTransaction());
439 System.out.println("t2 D");
440 t2.startTransaction();
441 t2.addKV(iKeyD, iValueD);
442 transStatusList.add(t2.commitTransaction());
445 System.out.println("Updating...");
446 while (t1.update() == false) {}
447 while (t2.update() == false) {}
448 while (t1.update() == false) {}
449 while (t2.update() == false) {}
451 System.out.println("Checking Key-Values...");
452 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
454 String keyA = "a" + i;
455 String keyB = "b" + i;
456 String keyC = "c" + i;
457 String keyD = "d" + i;
458 String valueA = "a" + i;
459 String valueB = "b" + i;
460 String valueC = "c" + i;
461 String valueD = "d" + i;
463 IoTString iKeyA = new IoTString(keyA);
464 IoTString iKeyB = new IoTString(keyB);
465 IoTString iKeyC = new IoTString(keyC);
466 IoTString iKeyD = new IoTString(keyD);
467 IoTString iValueA = new IoTString(valueA);
468 IoTString iValueB = new IoTString(valueB);
469 IoTString iValueC = new IoTString(valueC);
470 IoTString iValueD = new IoTString(valueD);
473 IoTString testValA1 = t1.getCommitted(iKeyA);
474 IoTString testValB1 = t1.getCommitted(iKeyB);
475 IoTString testValC1 = t1.getCommitted(iKeyC);
476 IoTString testValD1 = t1.getCommitted(iKeyD);
478 IoTString testValA2 = t2.getCommitted(iKeyA);
479 IoTString testValB2 = t2.getCommitted(iKeyB);
480 IoTString testValC2 = t2.getCommitted(iKeyC);
481 IoTString testValD2 = t2.getCommitted(iKeyD);
483 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
484 System.out.println("Key-Value t1 incorrect: " + keyA + " " + testValA1);
488 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
489 System.out.println("Key-Value t1 incorrect: " + keyB + " " + testValB1);
493 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
494 System.out.println("Key-Value t1 incorrect: " + keyC + " " + testValC1);
498 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
499 System.out.println("Key-Value t1 incorrect: " + keyD + " " + testValD1);
504 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
505 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
509 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
510 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
514 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
515 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
519 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
520 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
525 for (TransactionStatus status : transStatusList) {
526 if (status.getStatus() != TransactionStatus.StatusCommitted) {
532 System.out.println("Found Errors...");
534 System.out.println("No Errors Found...");
541 static void test10() {
543 boolean foundError = false;
544 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
546 // Setup the 2 clients
547 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
548 System.out.println("Init Table t1s");
553 } catch (Exception e) { }
555 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
556 while (t2.update() == false) {}
558 t1.addLocalCommunication(351, "127.0.0.1", 6001);
559 t2.addLocalCommunication(321, "127.0.0.1", 6000);
563 System.out.println("Setting up keys");
564 for (int i = 0; i < 4; i++) {
569 IoTString ia = new IoTString(a);
570 IoTString ib = new IoTString(b);
571 IoTString ic = new IoTString(c);
572 IoTString id = new IoTString(d);
575 t1.createNewKey(ia, 321);
577 } catch (Exception e) { }
582 t1.createNewKey(ib, 351);
584 } catch (Exception e) { }
589 t2.createNewKey(ic, 321);
591 } catch (Exception e) { }
596 t2.createNewKey(id, 351);
598 } catch (Exception e) { }
603 // Do Updates for the keys
604 System.out.println("B========================");
605 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
606 for (int i = 0; i < 4; i++) {
608 System.out.println(i);
610 String keyB = "b" + i;
611 String valueB = "b" + (i + t);
613 IoTString iKeyB = new IoTString(keyB);
614 IoTString iValueB = new IoTString(valueB);
616 t1.startTransaction();
617 System.out.println(t1.getSpeculativeAtomic(iKeyB));
618 t1.addKV(iKeyB, iValueB);
619 transStatusList.add(t1.commitTransaction());
622 System.out.println();
625 System.out.println("C========================");
626 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
627 for (int i = 0; i < 4; i++) {
628 System.out.println(i);
630 String keyC = "c" + i;
631 String valueC = "c" + (i + t);
633 IoTString iKeyC = new IoTString(keyC);
634 IoTString iValueC = new IoTString(valueC);
636 t2.startTransaction();
637 System.out.println(t2.getSpeculativeAtomic(iKeyC));
638 t2.addKV(iKeyC, iValueC);
639 transStatusList.add(t2.commitTransaction());
642 System.out.println();
645 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
646 for (int i = 0; i < 4; i++) {
647 String keyA = "a" + i;
648 String keyD = "d" + i;
649 String valueA = "a" + (i + t);
650 String valueD = "d" + (i + t);
652 IoTString iKeyA = new IoTString(keyA);
653 IoTString iKeyD = new IoTString(keyD);
654 IoTString iValueA = new IoTString(valueA);
655 IoTString iValueD = new IoTString(valueD);
658 t1.startTransaction();
659 t1.addKV(iKeyA, iValueA);
660 transStatusList.add(t1.commitTransaction());
663 t2.startTransaction();
664 t2.addKV(iKeyD, iValueD);
665 transStatusList.add(t2.commitTransaction());
666 System.out.println();
669 System.out.println();
671 System.out.println("Updating...");
672 System.out.println("t1 -=-=-=-=-=-=-=-");
673 while (t1.update() == false) {}
674 System.out.println("t2 -=-=-=-=-=-=-=-");
675 while (t2.update() == false) {}
676 System.out.println("t1 -=-=-=-=-=-=-=-");
677 while (t1.update() == false) {}
678 System.out.println("t2 -=-=-=-=-=-=-=-");
679 while (t2.update() == false) {}
682 System.out.println("Checking Key-Values...");
683 for (int i = 0; i < 4; i++) {
685 String keyA = "a" + i;
686 String keyB = "b" + i;
687 String keyC = "c" + i;
688 String keyD = "d" + i;
689 String valueA = "a" + (i + NUMBER_OF_TESTS - 1);
690 String valueB = "b" + (i + NUMBER_OF_TESTS - 1);
691 String valueC = "c" + (i + NUMBER_OF_TESTS - 1);
692 String valueD = "d" + (i + NUMBER_OF_TESTS - 1);
694 IoTString iKeyA = new IoTString(keyA);
695 IoTString iKeyB = new IoTString(keyB);
696 IoTString iKeyC = new IoTString(keyC);
697 IoTString iKeyD = new IoTString(keyD);
698 IoTString iValueA = new IoTString(valueA);
699 IoTString iValueB = new IoTString(valueB);
700 IoTString iValueC = new IoTString(valueC);
701 IoTString iValueD = new IoTString(valueD);
704 IoTString testValA1 = t1.getCommitted(iKeyA);
705 IoTString testValB1 = t1.getCommitted(iKeyB);
706 IoTString testValC1 = t1.getCommitted(iKeyC);
707 IoTString testValD1 = t1.getCommitted(iKeyD);
709 IoTString testValA2 = t2.getCommitted(iKeyA);
710 IoTString testValB2 = t2.getCommitted(iKeyB);
711 IoTString testValC2 = t2.getCommitted(iKeyC);
712 IoTString testValD2 = t2.getCommitted(iKeyD);
714 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
715 System.out.println("Key-Value t1 incorrect: " + keyA + " " + testValA1);
719 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
720 System.out.println("Key-Value t1 incorrect: " + keyB + " " + testValB1);
724 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
725 System.out.println("Key-Value t1 incorrect: " + keyC + " " + testValC1);
729 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
730 System.out.println("Key-Value t1 incorrect: " + keyD + " " + testValD1);
734 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
735 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
739 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
740 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
744 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
745 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
749 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
750 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
756 for (TransactionStatus status : transStatusList) {
757 if (status.getStatus() != TransactionStatus.StatusCommitted) {
759 System.out.println(counter + " Status: " + status.getStatus());
765 System.out.println("Found Errors...");
767 System.out.println("No Errors Found...");
774 static void test9() {
776 boolean foundError = false;
777 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
779 // Setup the 2 clients
780 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
782 System.out.println("Init Table t1s");
787 } catch (Exception e) { }
791 System.out.println("Update Table t2");
792 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
793 while (t2.update() == false) {}
795 t1.addLocalCommunication(351, "127.0.0.1", 6001);
796 t2.addLocalCommunication(321, "127.0.0.1", 6000);
799 System.out.println("Setting up keys");
800 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
801 System.out.println(i);
807 IoTString ia = new IoTString(a);
808 IoTString ib = new IoTString(b);
809 IoTString ic = new IoTString(c);
810 IoTString id = new IoTString(d);
814 t1.createNewKey(ia, 321);
816 } catch (Exception e) { }
821 t1.createNewKey(ib, 351);
823 } catch (Exception e) { }
828 t2.createNewKey(ic, 321);
830 } catch (Exception e) { }
835 t2.createNewKey(id, 351);
837 } catch (Exception e) { }
841 System.out.println("A, D...");
842 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
843 String keyA = "a" + i;
844 String keyD = "d" + i;
845 String valueA = "a" + i;
846 String valueD = "d" + i;
848 IoTString iKeyA = new IoTString(keyA);
849 IoTString iKeyD = new IoTString(keyD);
850 IoTString iValueA = new IoTString(valueA);
851 IoTString iValueD = new IoTString(valueD);
853 t1.startTransaction();
854 t1.addKV(iKeyA, iValueA);
855 transStatusList.add(t1.commitTransaction());
857 t2.startTransaction();
858 t2.addKV(iKeyD, iValueD);
859 transStatusList.add(t2.commitTransaction());
862 // while (t1.updateFromLocal(351) == false) {}
863 // while (t2.updateFromLocal(321) == false) {}
866 System.out.println("Updating...");
867 System.out.println("Checking Key-Values...");
869 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
871 String keyA = "a" + i;
872 String keyD = "d" + i;
873 String valueA = "a" + i;
874 String valueD = "d" + i;
877 IoTString iKeyA = new IoTString(keyA);
878 IoTString iKeyD = new IoTString(keyD);
879 IoTString iValueA = new IoTString(valueA);
880 IoTString iValueD = new IoTString(valueD);
883 IoTString testValA1 = t1.getCommitted(iKeyA);
884 IoTString testValD1 = t1.getCommitted(iKeyD);
885 IoTString testValA2 = t2.getCommitted(iKeyA);
886 IoTString testValD2 = t2.getCommitted(iKeyD);
889 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
890 System.out.println("Key-Value t1 incorrect: " + keyA + " " + testValA1);
894 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
895 System.out.println("Key-Value t1 incorrect: " + keyD + " " + testValD1);
900 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
901 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
905 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
906 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
911 for (TransactionStatus status : transStatusList) {
912 if (status.getStatus() != TransactionStatus.StatusCommitted) {
918 System.out.println("Found Errors...");
920 System.out.println("No Errors Found...");
927 static void test8() {
928 TimingSingleton timer = TimingSingleton.getInstance();
932 boolean foundError = false;
933 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
935 // Setup the 2 clients
936 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
938 System.out.println("Init Table t1s");
944 } catch (Exception e) { }
948 System.out.println("Update Table t2");
949 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
950 while (t2.update() == false) {}
952 t1.addLocalCommunication(351, "127.0.0.1", 6001);
953 t2.addLocalCommunication(321, "127.0.0.1", 6000);
956 System.out.println("Setting up keys");
957 startTime = System.nanoTime();
958 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
959 System.out.println(i);
965 IoTString ia = new IoTString(a);
966 IoTString ib = new IoTString(b);
967 IoTString ic = new IoTString(c);
968 IoTString id = new IoTString(d);
972 t1.createNewKey(ia, 321);
974 } catch (Exception e) { }
979 t1.createNewKey(ib, 351);
981 } catch (Exception e) { }
986 t2.createNewKey(ic, 321);
988 } catch (Exception e) { }
993 t2.createNewKey(id, 351);
995 } catch (Exception e) { }
998 endTime = System.nanoTime();
999 long keysDt = endTime - startTime;
1000 long keysNet = timer.getTime();
1003 // Do Updates for the keys
1004 startTime = System.nanoTime();
1005 System.out.println("Setting Key-Values...");
1006 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
1007 System.out.println(i);
1008 String keyA = "a" + i;
1009 String keyB = "b" + i;
1010 String keyC = "c" + i;
1011 String keyD = "d" + i;
1012 String valueA = "a" + i;
1013 String valueB = "b" + i;
1014 String valueC = "c" + i;
1015 String valueD = "d" + i;
1017 IoTString iKeyA = new IoTString(keyA);
1018 IoTString iKeyB = new IoTString(keyB);
1019 IoTString iKeyC = new IoTString(keyC);
1020 IoTString iKeyD = new IoTString(keyD);
1021 IoTString iValueA = new IoTString(valueA);
1022 IoTString iValueB = new IoTString(valueB);
1023 IoTString iValueC = new IoTString(valueC);
1024 IoTString iValueD = new IoTString(valueD);
1027 String keyAPrev = "a" + (i - 1);
1028 String keyBPrev = "b" + (i - 1);
1029 String keyCPrev = "c" + (i - 1);
1030 String keyDPrev = "d" + (i - 1);
1031 String valueAPrev = "a" + (i - 1);
1032 String valueBPrev = "b" + (i - 1);
1033 String valueCPrev = "c" + (i - 1);
1034 String valueDPrev = "d" + (i - 1);
1036 IoTString iKeyAPrev = new IoTString(keyAPrev);
1037 IoTString iKeyBPrev = new IoTString(keyBPrev);
1038 IoTString iKeyCPrev = new IoTString(keyCPrev);
1039 IoTString iKeyDPrev = new IoTString(keyDPrev);
1040 IoTString iValueAPrev = new IoTString(valueAPrev);
1041 IoTString iValueBPrev = new IoTString(valueBPrev);
1042 IoTString iValueCPrev = new IoTString(valueCPrev);
1043 IoTString iValueDPrev = new IoTString(valueDPrev);
1045 t1.startTransaction();
1046 t1.addKV(iKeyA, iValueA);
1047 transStatusList.add(t1.commitTransaction());
1049 t1.startTransaction();
1050 t1.addKV(iKeyB, iValueB);
1051 transStatusList.add(t1.commitTransaction());
1053 t2.startTransaction();
1054 t2.addKV(iKeyC, iValueC);
1055 transStatusList.add(t2.commitTransaction());
1057 t2.startTransaction();
1058 t2.addKV(iKeyD, iValueD);
1059 transStatusList.add(t2.commitTransaction());
1061 endTime = System.nanoTime();
1062 long writesDt = endTime - startTime;
1063 long writesNet = timer.getTime() - keysNet;
1067 System.out.println("Updating...");
1068 startTime = System.nanoTime();
1069 while (t1.update() == false) {}
1070 while (t2.update() == false) {}
1071 while (t1.update() == false) {}
1072 while (t2.update() == false) {}
1073 endTime = System.nanoTime();
1074 long updatesDt = endTime - startTime;
1075 long updatesNet = timer.getTime() - keysNet - writesNet;
1078 System.out.println("Total Key Create Time: " + keysDt / 1000000);
1079 System.out.println("Total Key Create Time Network: " + keysNet / 1000000);
1080 System.out.println("Total Key Create Time no Network: " + (keysDt - keysNet) / 1000000);
1081 System.out.println();
1082 System.out.println("Total write Time: " + writesDt / 1000000);
1083 System.out.println("Total write Time Network: " + writesNet / 1000000);
1084 System.out.println("Total write Time no Network: " + (writesDt - writesNet) / 1000000);
1085 System.out.println();
1086 System.out.println("Total updates Time: " + updatesDt / 1000000);
1087 System.out.println("Total updates Time Network: " + updatesNet / 1000000);
1088 System.out.println("Total updates Time no Network: " + (updatesDt - updatesNet) / 1000000);
1093 // System.out.println("Checking Key-Values...");
1094 // for (int i = 0; i < NUMBER_OF_TESTS; i++) {
1096 // String keyA = "a" + i;
1097 // String keyB = "b" + i;
1098 // String keyC = "c" + i;
1099 // String keyD = "d" + i;
1100 // String valueA = "a" + i;
1101 // String valueB = "b" + i;
1102 // String valueC = "c" + i;
1103 // String valueD = "d" + i;
1105 // IoTString iKeyA = new IoTString(keyA);
1106 // IoTString iKeyB = new IoTString(keyB);
1107 // IoTString iKeyC = new IoTString(keyC);
1108 // IoTString iKeyD = new IoTString(keyD);
1109 // IoTString iValueA = new IoTString(valueA);
1110 // IoTString iValueB = new IoTString(valueB);
1111 // IoTString iValueC = new IoTString(valueC);
1112 // IoTString iValueD = new IoTString(valueD);
1115 // IoTString testValA1 = t1.getCommitted(iKeyA);
1116 // IoTString testValB1 = t1.getCommitted(iKeyB);
1117 // IoTString testValC1 = t1.getCommitted(iKeyC);
1118 // IoTString testValD1 = t1.getCommitted(iKeyD);
1120 // IoTString testValA2 = t2.getCommitted(iKeyA);
1121 // IoTString testValB2 = t2.getCommitted(iKeyB);
1122 // IoTString testValC2 = t2.getCommitted(iKeyC);
1123 // IoTString testValD2 = t2.getCommitted(iKeyD);
1125 // if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
1126 // System.out.println("Key-Value t1 incorrect: " + keyA + " " + testValA1);
1127 // foundError = true;
1130 // if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
1131 // System.out.println("Key-Value t1 incorrect: " + keyB + " " + testValB1);
1132 // foundError = true;
1135 // if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
1136 // System.out.println("Key-Value t1 incorrect: " + keyC + " " + testValC1);
1137 // foundError = true;
1140 // if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
1141 // System.out.println("Key-Value t1 incorrect: " + keyD + " " + testValD1);
1142 // foundError = true;
1146 // if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
1147 // System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
1148 // foundError = true;
1151 // if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
1152 // System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
1153 // foundError = true;
1156 // if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
1157 // System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
1158 // foundError = true;
1161 // if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
1162 // System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
1163 // foundError = true;
1167 // for (TransactionStatus status : transStatusList) {
1168 // if (status.getStatus() != TransactionStatus.StatusCommitted) {
1169 // foundError = true;
1173 // if (foundError) {
1174 // System.out.println("Found Errors...");
1176 // System.out.println("No Errors Found...");
1182 // System.out.println();
1183 // System.out.println();
1186 // System.out.println();
1187 // System.out.println();
1191 static void test7() throws ServerException {
1193 boolean foundError = false;
1194 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
1196 // Setup the 2 clients
1197 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
1199 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
1203 System.out.println("Setting up keys");
1204 for (int i = 0; i < 4; i++) {
1209 IoTString ia = new IoTString(a);
1210 IoTString ib = new IoTString(b);
1211 IoTString ic = new IoTString(c);
1212 IoTString id = new IoTString(d);
1213 t1.createNewKey(ia, 321);
1214 t1.createNewKey(ib, 351);
1215 t2.createNewKey(ic, 321);
1216 t2.createNewKey(id, 351);
1219 // Do Updates for the keys
1220 System.out.println("Setting Key-Values...");
1222 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
1223 for (int i = 0; i < 4; i++) {
1224 String keyB = "b" + i;
1225 String valueB = "b" + (i + t);
1227 IoTString iKeyB = new IoTString(keyB);
1228 IoTString iValueB = new IoTString(valueB);
1230 t1.startTransaction();
1231 t1.getSpeculativeAtomic(iKeyB);
1232 t1.addKV(iKeyB, iValueB);
1233 transStatusList.add(t1.commitTransaction());
1237 for (int i = 0; i < 4; i++) {
1239 String keyB = "b" + i;
1240 String valueB = "b" + (i + NUMBER_OF_TESTS - 1);
1241 IoTString iKeyB = new IoTString(keyB);
1242 IoTString iValueB = new IoTString(valueB);
1244 IoTString testValB1 = t1.getSpeculative(iKeyB);
1245 IoTString testValB2 = t2.getSpeculative(iKeyB);
1247 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
1248 System.out.println("Key-Value t1 incorrect: " + keyB + " " + testValB1);
1252 if ((testValB2 != null)) {
1253 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
1258 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
1259 for (int i = 0; i < 4; i++) {
1260 String keyC = "c" + i;
1261 String valueC = "c" + (i + t);
1263 IoTString iKeyC = new IoTString(keyC);
1264 IoTString iValueC = new IoTString(valueC);
1266 t2.startTransaction();
1267 t2.getSpeculativeAtomic(iKeyC);
1268 t2.addKV(iKeyC, iValueC);
1269 transStatusList.add(t2.commitTransaction());
1273 for (int i = 0; i < 4; i++) {
1274 String keyC = "c" + i;
1275 String valueC = "c" + (i + NUMBER_OF_TESTS - 1);
1276 IoTString iKeyC = new IoTString(keyC);
1277 IoTString iValueC = new IoTString(valueC);
1279 IoTString testValC1 = t1.getSpeculative(iKeyC);
1280 IoTString testValC2 = t2.getSpeculative(iKeyC);
1282 if ((testValC1 != null)) {
1283 System.out.println("Key-Value t1 incorrect: " + keyC + " " + testValC1);
1287 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
1288 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
1293 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
1294 for (int i = 0; i < 4; i++) {
1295 String keyA = "a" + i;
1296 String keyD = "d" + i;
1297 String valueA = "a" + (i + t);
1298 String valueD = "d" + (i + t);
1300 IoTString iKeyA = new IoTString(keyA);
1301 IoTString iKeyD = new IoTString(keyD);
1302 IoTString iValueA = new IoTString(valueA);
1303 IoTString iValueD = new IoTString(valueD);
1305 t1.startTransaction();
1306 t1.addKV(iKeyA, iValueA);
1307 transStatusList.add(t1.commitTransaction());
1309 t2.startTransaction();
1310 t2.addKV(iKeyD, iValueD);
1311 transStatusList.add(t2.commitTransaction());
1315 System.out.println("Updating Clients...");
1321 System.out.println("Checking Key-Values...");
1322 for (int i = 0; i < 4; i++) {
1324 String keyA = "a" + i;
1325 String keyB = "b" + i;
1326 String keyC = "c" + i;
1327 String keyD = "d" + i;
1328 String valueA = "a" + (i + NUMBER_OF_TESTS - 1);
1329 String valueB = "b" + (i + NUMBER_OF_TESTS - 1);
1330 String valueC = "c" + (i + NUMBER_OF_TESTS - 1);
1331 String valueD = "d" + (i + NUMBER_OF_TESTS - 1);
1333 IoTString iKeyA = new IoTString(keyA);
1334 IoTString iKeyB = new IoTString(keyB);
1335 IoTString iKeyC = new IoTString(keyC);
1336 IoTString iKeyD = new IoTString(keyD);
1337 IoTString iValueA = new IoTString(valueA);
1338 IoTString iValueB = new IoTString(valueB);
1339 IoTString iValueC = new IoTString(valueC);
1340 IoTString iValueD = new IoTString(valueD);
1343 IoTString testValA1 = t1.getCommitted(iKeyA);
1344 IoTString testValB1 = t1.getCommitted(iKeyB);
1345 IoTString testValC1 = t1.getCommitted(iKeyC);
1346 IoTString testValD1 = t1.getCommitted(iKeyD);
1348 IoTString testValA2 = t2.getCommitted(iKeyA);
1349 IoTString testValB2 = t2.getCommitted(iKeyB);
1350 IoTString testValC2 = t2.getCommitted(iKeyC);
1351 IoTString testValD2 = t2.getCommitted(iKeyD);
1353 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
1354 System.out.println("Key-Value t1 incorrect: " + keyA + " " + testValA1);
1358 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
1359 System.out.println("Key-Value t1 incorrect: " + keyB + " " + testValB1);
1363 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
1364 System.out.println("Key-Value t1 incorrect: " + keyC + " " + testValC1);
1368 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
1369 System.out.println("Key-Value t1 incorrect: " + keyD + " " + testValD1);
1373 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
1374 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
1378 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
1379 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
1383 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
1384 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
1388 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
1389 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
1394 for (TransactionStatus status : transStatusList) {
1395 if (status.getStatus() != TransactionStatus.StatusCommitted) {
1401 System.out.println("Found Errors...");
1403 System.out.println("No Errors Found...");
1407 static void test6() throws ServerException {
1409 boolean foundError = false;
1410 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
1412 // Setup the 2 clients
1413 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
1415 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
1419 System.out.println("Setting up keys");
1420 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
1425 IoTString ia = new IoTString(a);
1426 IoTString ib = new IoTString(b);
1427 IoTString ic = new IoTString(c);
1428 IoTString id = new IoTString(d);
1429 t1.createNewKey(ia, 321);
1430 t1.createNewKey(ib, 351);
1431 t2.createNewKey(ic, 321);
1432 t2.createNewKey(id, 351);
1435 // Do Updates for the keys
1436 System.out.println("Setting Key-Values...");
1437 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
1438 String keyA = "a" + i;
1439 String keyB = "b" + i;
1440 String keyC = "c" + i;
1441 String keyD = "d" + i;
1442 String valueA = "a" + i;
1443 String valueB = "b" + i;
1444 String valueC = "c" + i;
1445 String valueD = "d" + i;
1447 IoTString iKeyA = new IoTString(keyA);
1448 IoTString iKeyB = new IoTString(keyB);
1449 IoTString iKeyC = new IoTString(keyC);
1450 IoTString iKeyD = new IoTString(keyD);
1451 IoTString iValueA = new IoTString(valueA);
1452 IoTString iValueB = new IoTString(valueB);
1453 IoTString iValueC = new IoTString(valueC);
1454 IoTString iValueD = new IoTString(valueD);
1456 t1.startTransaction();
1457 t1.getCommittedAtomic(iKeyA);
1458 t1.addKV(iKeyA, iValueA);
1459 transStatusList.add(t1.commitTransaction());
1461 t1.startTransaction();
1462 t1.getCommittedAtomic(iKeyB);
1463 t1.addKV(iKeyB, iValueB);
1464 transStatusList.add(t1.commitTransaction());
1466 t2.startTransaction();
1467 t2.getCommittedAtomic(iKeyC);
1468 t2.addKV(iKeyC, iValueC);
1469 transStatusList.add(t2.commitTransaction());
1471 t2.startTransaction();
1472 t2.getCommittedAtomic(iKeyD);
1473 t2.addKV(iKeyD, iValueD);
1474 transStatusList.add(t2.commitTransaction());
1477 System.out.println("Updating Clients...");
1481 System.out.println("Checking Key-Values...");
1482 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
1484 String keyA = "a" + i;
1485 String keyB = "b" + i;
1486 String keyC = "c" + i;
1487 String keyD = "d" + i;
1488 String valueA = "a" + i;
1489 String valueB = "b" + i;
1490 String valueC = "c" + i;
1491 String valueD = "d" + i;
1493 IoTString iKeyA = new IoTString(keyA);
1494 IoTString iKeyB = new IoTString(keyB);
1495 IoTString iKeyC = new IoTString(keyC);
1496 IoTString iKeyD = new IoTString(keyD);
1497 IoTString iValueA = new IoTString(valueA);
1498 IoTString iValueB = new IoTString(valueB);
1499 IoTString iValueC = new IoTString(valueC);
1500 IoTString iValueD = new IoTString(valueD);
1503 IoTString testValA1 = t1.getCommitted(iKeyA);
1504 IoTString testValB1 = t1.getCommitted(iKeyB);
1505 IoTString testValC1 = t1.getCommitted(iKeyC);
1506 IoTString testValD1 = t1.getCommitted(iKeyD);
1508 IoTString testValA2 = t2.getCommitted(iKeyA);
1509 IoTString testValB2 = t2.getCommitted(iKeyB);
1510 IoTString testValC2 = t2.getCommitted(iKeyC);
1511 IoTString testValD2 = t2.getCommitted(iKeyD);
1513 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
1514 System.out.println("Key-Value t1 incorrect: " + keyA);
1518 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
1519 System.out.println("Key-Value t1 incorrect: " + keyB);
1523 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
1524 System.out.println("Key-Value t1 incorrect: " + keyC);
1528 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
1529 System.out.println("Key-Value t1 incorrect: " + keyD);
1534 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
1535 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
1539 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
1540 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
1544 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
1545 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
1549 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
1550 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
1555 for (TransactionStatus status : transStatusList) {
1556 if (status.getStatus() != TransactionStatus.StatusCommitted) {
1562 System.out.println("Found Errors...");
1564 System.out.println("No Errors Found...");
1568 static void test5() throws ServerException {
1570 boolean foundError = false;
1571 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
1573 // Setup the 2 clients
1574 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
1576 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
1581 System.out.println("Setting up keys");
1582 for (int i = 0; i < 4; i++) {
1587 IoTString ia = new IoTString(a);
1588 IoTString ib = new IoTString(b);
1589 IoTString ic = new IoTString(c);
1590 IoTString id = new IoTString(d);
1591 t1.createNewKey(ia, 321);
1592 t1.createNewKey(ib, 351);
1593 t2.createNewKey(ic, 321);
1594 t2.createNewKey(id, 351);
1597 // Do Updates for the keys
1598 System.out.println("Setting Key-Values...");
1600 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
1601 for (int i = 0; i < 4; i++) {
1602 String keyB = "b" + i;
1603 String valueB = "b" + (i + t);
1605 IoTString iKeyB = new IoTString(keyB);
1606 IoTString iValueB = new IoTString(valueB);
1608 t1.startTransaction();
1609 t1.addKV(iKeyB, iValueB);
1610 transStatusList.add(t1.commitTransaction());
1614 for (int i = 0; i < 4; i++) {
1616 String keyB = "b" + i;
1617 String valueB = "b" + (i + NUMBER_OF_TESTS - 1);
1618 IoTString iKeyB = new IoTString(keyB);
1619 IoTString iValueB = new IoTString(valueB);
1621 IoTString testValB1 = t1.getSpeculative(iKeyB);
1622 IoTString testValB2 = t2.getSpeculative(iKeyB);
1624 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
1625 System.out.println("Key-Value t1 incorrect: " + keyB);
1629 if ((testValB2 != null)) {
1630 System.out.println("Key-Value t2 incorrect: " + keyB);
1635 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
1636 for (int i = 0; i < 4; i++) {
1637 String keyC = "c" + i;
1638 String valueC = "c" + (i + t);
1640 IoTString iKeyC = new IoTString(keyC);
1641 IoTString iValueC = new IoTString(valueC);
1643 t2.startTransaction();
1644 t2.addKV(iKeyC, iValueC);
1645 transStatusList.add(t2.commitTransaction());
1649 for (int i = 0; i < 4; i++) {
1650 String keyC = "c" + i;
1651 String valueC = "c" + (i + NUMBER_OF_TESTS - 1);
1652 IoTString iKeyC = new IoTString(keyC);
1653 IoTString iValueC = new IoTString(valueC);
1655 IoTString testValC1 = t1.getSpeculative(iKeyC);
1656 IoTString testValC2 = t2.getSpeculative(iKeyC);
1658 if ((testValC1 != null)) {
1659 System.out.println("Key-Value t1 incorrect: " + keyC + " " + testValC1);
1663 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
1664 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
1669 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
1670 for (int i = 0; i < 4; i++) {
1671 String keyA = "a" + i;
1672 String keyD = "d" + i;
1673 String valueA = "a" + (i + t);
1674 String valueD = "d" + (i + t);
1676 IoTString iKeyA = new IoTString(keyA);
1677 IoTString iKeyD = new IoTString(keyD);
1678 IoTString iValueA = new IoTString(valueA);
1679 IoTString iValueD = new IoTString(valueD);
1681 t1.startTransaction();
1682 t1.addKV(iKeyA, iValueA);
1683 transStatusList.add(t1.commitTransaction());
1685 t2.startTransaction();
1686 t2.addKV(iKeyD, iValueD);
1687 transStatusList.add(t2.commitTransaction());
1691 System.out.println("Updating Clients...");
1696 System.out.println("Checking Key-Values...");
1697 for (int i = 0; i < 4; i++) {
1699 String keyA = "a" + i;
1700 String keyB = "b" + i;
1701 String keyC = "c" + i;
1702 String keyD = "d" + i;
1703 String valueA = "a" + (i + NUMBER_OF_TESTS - 1);
1704 String valueB = "b" + (i + NUMBER_OF_TESTS - 1);
1705 String valueC = "c" + (i + NUMBER_OF_TESTS - 1);
1706 String valueD = "d" + (i + NUMBER_OF_TESTS - 1);
1708 IoTString iKeyA = new IoTString(keyA);
1709 IoTString iKeyB = new IoTString(keyB);
1710 IoTString iKeyC = new IoTString(keyC);
1711 IoTString iKeyD = new IoTString(keyD);
1712 IoTString iValueA = new IoTString(valueA);
1713 IoTString iValueB = new IoTString(valueB);
1714 IoTString iValueC = new IoTString(valueC);
1715 IoTString iValueD = new IoTString(valueD);
1718 IoTString testValA1 = t1.getCommitted(iKeyA);
1719 IoTString testValB1 = t1.getCommitted(iKeyB);
1720 IoTString testValC1 = t1.getCommitted(iKeyC);
1721 IoTString testValD1 = t1.getCommitted(iKeyD);
1723 IoTString testValA2 = t2.getCommitted(iKeyA);
1724 IoTString testValB2 = t2.getCommitted(iKeyB);
1725 IoTString testValC2 = t2.getCommitted(iKeyC);
1726 IoTString testValD2 = t2.getCommitted(iKeyD);
1728 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
1729 System.out.println("Key-Value t1 incorrect: " + keyA + " " + testValA1);
1733 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
1734 System.out.println("Key-Value t1 incorrect: " + keyB + " " + testValB1);
1738 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
1739 System.out.println("Key-Value t1 incorrect: " + keyC + " " + testValC1);
1743 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
1744 System.out.println("Key-Value t1 incorrect: " + keyD + " " + testValD1);
1749 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
1750 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
1754 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
1755 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
1759 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
1760 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
1764 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
1765 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
1770 for (TransactionStatus status : transStatusList) {
1771 if (status.getStatus() != TransactionStatus.StatusCommitted) {
1777 System.out.println("Found Errors...");
1779 System.out.println("No Errors Found...");
1783 static void test4() throws ServerException {
1785 boolean foundError = false;
1788 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
1790 // Setup the 2 clients
1791 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
1793 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
1797 System.out.println("Setting up keys");
1798 startTime = System.currentTimeMillis();
1799 for (int i = 0; i < 4; i++) {
1804 IoTString ia = new IoTString(a);
1805 IoTString ib = new IoTString(b);
1806 IoTString ic = new IoTString(c);
1807 IoTString id = new IoTString(d);
1808 t1.createNewKey(ia, 321);
1809 t1.createNewKey(ib, 351);
1810 t2.createNewKey(ic, 321);
1811 t2.createNewKey(id, 351);
1813 endTime = System.currentTimeMillis();
1814 System.out.println("Time Taken: " + (double) ((endTime - startTime) / 1000.0) );
1815 System.out.println("Time Taken Per Key: " + (double) (((endTime - startTime) / 1000.0) / (NUMBER_OF_TESTS * 4)) );
1816 System.out.println();
1819 // Do Updates for the keys
1820 System.out.println("Setting Key-Values...");
1821 startTime = System.currentTimeMillis();
1822 for (int t = 0; t < NUMBER_OF_TESTS; t++) {
1823 for (int i = 0; i < 4; i++) {
1824 String keyA = "a" + i;
1825 String keyB = "b" + i;
1826 String keyC = "c" + i;
1827 String keyD = "d" + i;
1828 String valueA = "a" + i;
1829 String valueB = "b" + i;
1830 String valueC = "c" + i;
1831 String valueD = "d" + i;
1833 IoTString iKeyA = new IoTString(keyA);
1834 IoTString iKeyB = new IoTString(keyB);
1835 IoTString iKeyC = new IoTString(keyC);
1836 IoTString iKeyD = new IoTString(keyD);
1837 IoTString iValueA = new IoTString(valueA);
1838 IoTString iValueB = new IoTString(valueB);
1839 IoTString iValueC = new IoTString(valueC);
1840 IoTString iValueD = new IoTString(valueD);
1842 t1.startTransaction();
1843 t1.addKV(iKeyA, iValueA);
1844 transStatusList.add(t1.commitTransaction());
1846 t1.startTransaction();
1847 t1.addKV(iKeyB, iValueB);
1848 transStatusList.add(t1.commitTransaction());
1850 t2.startTransaction();
1851 t2.addKV(iKeyC, iValueC);
1852 transStatusList.add(t2.commitTransaction());
1854 t2.startTransaction();
1855 t2.addKV(iKeyD, iValueD);
1856 transStatusList.add(t2.commitTransaction());
1859 endTime = System.currentTimeMillis();
1860 System.out.println("Time Taken: " + (double) ((endTime - startTime) / 1000.0) );
1861 System.out.println("Time Taken Per Update: " + (double) (((endTime - startTime) / 1000.0) / (NUMBER_OF_TESTS * 16)) );
1862 System.out.println();
1865 System.out.println("Updating Clients...");
1870 System.out.println("Checking Key-Values...");
1871 for (int i = 0; i < 4; i++) {
1873 String keyA = "a" + i;
1874 String keyB = "b" + i;
1875 String keyC = "c" + i;
1876 String keyD = "d" + i;
1877 String valueA = "a" + i;
1878 String valueB = "b" + i;
1879 String valueC = "c" + i;
1880 String valueD = "d" + i;
1882 IoTString iKeyA = new IoTString(keyA);
1883 IoTString iKeyB = new IoTString(keyB);
1884 IoTString iKeyC = new IoTString(keyC);
1885 IoTString iKeyD = new IoTString(keyD);
1886 IoTString iValueA = new IoTString(valueA);
1887 IoTString iValueB = new IoTString(valueB);
1888 IoTString iValueC = new IoTString(valueC);
1889 IoTString iValueD = new IoTString(valueD);
1892 IoTString testValA1 = t1.getCommitted(iKeyA);
1893 IoTString testValB1 = t1.getCommitted(iKeyB);
1894 IoTString testValC1 = t1.getCommitted(iKeyC);
1895 IoTString testValD1 = t1.getCommitted(iKeyD);
1897 IoTString testValA2 = t2.getCommitted(iKeyA);
1898 IoTString testValB2 = t2.getCommitted(iKeyB);
1899 IoTString testValC2 = t2.getCommitted(iKeyC);
1900 IoTString testValD2 = t2.getCommitted(iKeyD);
1902 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
1903 System.out.println("Key-Value t1 incorrect: " + keyA);
1907 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
1908 System.out.println("Key-Value t1 incorrect: " + keyB);
1912 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
1913 System.out.println("Key-Value t1 incorrect: " + keyC);
1917 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
1918 System.out.println("Key-Value t1 incorrect: " + keyD);
1923 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
1924 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
1928 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
1929 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
1933 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
1934 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
1938 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
1939 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
1944 for (TransactionStatus status : transStatusList) {
1945 if (status.getStatus() != TransactionStatus.StatusCommitted) {
1951 System.out.println("Found Errors...");
1953 System.out.println("No Errors Found...");
1957 static void test3() throws ServerException {
1961 boolean foundError = false;
1963 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
1965 // Setup the 2 clients
1966 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
1968 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
1973 System.out.println("Setting up keys");
1974 startTime = System.currentTimeMillis();
1975 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
1980 IoTString ia = new IoTString(a);
1981 IoTString ib = new IoTString(b);
1982 IoTString ic = new IoTString(c);
1983 IoTString id = new IoTString(d);
1984 t1.createNewKey(ia, 321);
1985 t1.createNewKey(ib, 351);
1986 t2.createNewKey(ic, 321);
1987 t2.createNewKey(id, 351);
1989 endTime = System.currentTimeMillis();
1990 System.out.println("Time Taken: " + (double) ((endTime - startTime) / 1000.0) );
1991 System.out.println("Time Taken Per Key: " + (double) (((endTime - startTime) / 1000.0) / (NUMBER_OF_TESTS * 4)) );
1992 System.out.println();
1995 // Do Updates for the keys
1996 System.out.println("Setting Key-Values...");
1997 startTime = System.currentTimeMillis();
1999 System.out.println("B...");
2000 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
2001 String keyB = "b" + i;
2002 String valueB = "b" + i;
2004 IoTString iKeyB = new IoTString(keyB);
2005 IoTString iValueB = new IoTString(valueB);
2007 t1.startTransaction();
2008 t1.addKV(iKeyB, iValueB);
2009 transStatusList.add(t1.commitTransaction());
2012 System.out.println("C...");
2013 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
2014 String keyC = "c" + i;
2015 String valueC = "c" + i;
2017 IoTString iKeyC = new IoTString(keyC);
2018 IoTString iValueC = new IoTString(valueC);
2020 t2.startTransaction();
2021 t2.addKV(iKeyC, iValueC);
2022 transStatusList.add(t2.commitTransaction());
2025 System.out.println("A, D...");
2026 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
2027 String keyA = "a" + i;
2028 String keyD = "d" + i;
2029 String valueA = "a" + i;
2030 String valueD = "d" + i;
2032 IoTString iKeyA = new IoTString(keyA);
2033 IoTString iKeyD = new IoTString(keyD);
2034 IoTString iValueA = new IoTString(valueA);
2035 IoTString iValueD = new IoTString(valueD);
2037 t1.startTransaction();
2038 t1.addKV(iKeyA, iValueA);
2039 transStatusList.add(t1.commitTransaction());
2041 t2.startTransaction();
2042 t2.addKV(iKeyD, iValueD);
2043 transStatusList.add(t2.commitTransaction());
2045 endTime = System.currentTimeMillis();
2046 System.out.println("Time Taken: " + (double) ((endTime - startTime) / 1000.0) );
2047 System.out.println("Time Taken Per Update: " + (double) (((endTime - startTime) / 1000.0) / (NUMBER_OF_TESTS * 4)) );
2048 System.out.println();
2051 System.out.println("Updating Clients...");
2056 System.out.println("Checking Key-Values...");
2057 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
2059 String keyA = "a" + i;
2060 String keyB = "b" + i;
2061 String keyC = "c" + i;
2062 String keyD = "d" + i;
2063 String valueA = "a" + i;
2064 String valueB = "b" + i;
2065 String valueC = "c" + i;
2066 String valueD = "d" + i;
2068 IoTString iKeyA = new IoTString(keyA);
2069 IoTString iKeyB = new IoTString(keyB);
2070 IoTString iKeyC = new IoTString(keyC);
2071 IoTString iKeyD = new IoTString(keyD);
2072 IoTString iValueA = new IoTString(valueA);
2073 IoTString iValueB = new IoTString(valueB);
2074 IoTString iValueC = new IoTString(valueC);
2075 IoTString iValueD = new IoTString(valueD);
2078 IoTString testValA1 = t1.getCommitted(iKeyA);
2079 IoTString testValB1 = t1.getCommitted(iKeyB);
2080 IoTString testValC1 = t1.getCommitted(iKeyC);
2081 IoTString testValD1 = t1.getCommitted(iKeyD);
2083 IoTString testValA2 = t2.getCommitted(iKeyA);
2084 IoTString testValB2 = t2.getCommitted(iKeyB);
2085 IoTString testValC2 = t2.getCommitted(iKeyC);
2086 IoTString testValD2 = t2.getCommitted(iKeyD);
2088 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
2089 System.out.println("Key-Value t1 incorrect: " + keyA);
2093 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
2094 System.out.println("Key-Value t1 incorrect: " + keyB);
2098 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
2099 System.out.println("Key-Value t1 incorrect: " + keyC);
2103 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
2104 System.out.println("Key-Value t1 incorrect: " + keyD);
2109 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
2110 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
2114 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
2115 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
2119 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
2120 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
2124 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
2125 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
2130 for (TransactionStatus status : transStatusList) {
2131 if (status.getStatus() != TransactionStatus.StatusCommitted) {
2137 System.out.println("Found Errors...");
2139 System.out.println("No Errors Found...");
2143 static void test2() throws ServerException {
2144 TimingSingleton timer = TimingSingleton.getInstance();
2146 boolean foundError = false;
2147 List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
2149 // Setup the 2 clients
2150 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
2152 System.out.println("T1 Ready");
2154 Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
2156 System.out.println("T2 Ready");
2159 System.out.println("Setting up keys");
2160 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
2161 System.out.println(i);
2166 IoTString ia = new IoTString(a);
2167 IoTString ib = new IoTString(b);
2168 IoTString ic = new IoTString(c);
2169 IoTString id = new IoTString(d);
2170 t1.createNewKey(ia, 321);
2171 t1.createNewKey(ib, 351);
2172 t2.createNewKey(ic, 321);
2173 t2.createNewKey(id, 351);
2176 // Do Updates for the keys
2177 System.out.println("Setting Key-Values...");
2178 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
2179 System.out.println(i);
2180 String keyA = "a" + i;
2181 String keyB = "b" + i;
2182 String keyC = "c" + i;
2183 String keyD = "d" + i;
2184 String valueA = "a" + i;
2185 String valueB = "b" + i;
2186 String valueC = "c" + i;
2187 String valueD = "d" + i;
2189 IoTString iKeyA = new IoTString(keyA);
2190 IoTString iKeyB = new IoTString(keyB);
2191 IoTString iKeyC = new IoTString(keyC);
2192 IoTString iKeyD = new IoTString(keyD);
2193 IoTString iValueA = new IoTString(valueA);
2194 IoTString iValueB = new IoTString(valueB);
2195 IoTString iValueC = new IoTString(valueC);
2196 IoTString iValueD = new IoTString(valueD);
2199 t1.startTransaction();
2200 t1.addKV(iKeyA, iValueA);
2201 transStatusList.add(t1.commitTransaction());
2202 t1.startTransaction();
2203 t1.addKV(iKeyB, iValueB);
2204 transStatusList.add(t1.commitTransaction());
2206 t2.startTransaction();
2207 t2.addKV(iKeyC, iValueC);
2208 transStatusList.add(t2.commitTransaction());
2210 t2.startTransaction();
2211 t2.addKV(iKeyD, iValueD);
2212 transStatusList.add(t2.commitTransaction());
2216 System.out.println("Updating Clients...");
2223 System.out.println("Checking Key-Values...");
2224 for (int i = 0; i < NUMBER_OF_TESTS; i++) {
2226 String keyA = "a" + i;
2227 String keyB = "b" + i;
2228 String keyC = "c" + i;
2229 String keyD = "d" + i;
2230 String valueA = "a" + i;
2231 String valueB = "b" + i;
2232 String valueC = "c" + i;
2233 String valueD = "d" + i;
2235 IoTString iKeyA = new IoTString(keyA);
2236 IoTString iKeyB = new IoTString(keyB);
2237 IoTString iKeyC = new IoTString(keyC);
2238 IoTString iKeyD = new IoTString(keyD);
2239 IoTString iValueA = new IoTString(valueA);
2240 IoTString iValueB = new IoTString(valueB);
2241 IoTString iValueC = new IoTString(valueC);
2242 IoTString iValueD = new IoTString(valueD);
2245 IoTString testValA1 = t1.getCommitted(iKeyA);
2246 IoTString testValB1 = t1.getCommitted(iKeyB);
2247 IoTString testValC1 = t1.getCommitted(iKeyC);
2248 IoTString testValD1 = t1.getCommitted(iKeyD);
2250 IoTString testValA2 = t2.getCommitted(iKeyA);
2251 IoTString testValB2 = t2.getCommitted(iKeyB);
2252 IoTString testValC2 = t2.getCommitted(iKeyC);
2253 IoTString testValD2 = t2.getCommitted(iKeyD);
2255 if ((testValA1 == null) || (testValA1.equals(iValueA) == false)) {
2256 System.out.println("Key-Value t1 incorrect: " + keyA);
2260 if ((testValB1 == null) || (testValB1.equals(iValueB) == false)) {
2261 System.out.println("Key-Value t1 incorrect: " + keyB);
2265 if ((testValC1 == null) || (testValC1.equals(iValueC) == false)) {
2266 System.out.println("Key-Value t1 incorrect: " + keyC);
2270 if ((testValD1 == null) || (testValD1.equals(iValueD) == false)) {
2271 System.out.println("Key-Value t1 incorrect: " + keyD);
2276 if ((testValA2 == null) || (testValA2.equals(iValueA) == false)) {
2277 System.out.println("Key-Value t2 incorrect: " + keyA + " " + testValA2);
2281 if ((testValB2 == null) || (testValB2.equals(iValueB) == false)) {
2282 System.out.println("Key-Value t2 incorrect: " + keyB + " " + testValB2);
2286 if ((testValC2 == null) || (testValC2.equals(iValueC) == false)) {
2287 System.out.println("Key-Value t2 incorrect: " + keyC + " " + testValC2);
2291 if ((testValD2 == null) || (testValD2.equals(iValueD) == false)) {
2292 System.out.println("Key-Value t2 incorrect: " + keyD + " " + testValD2);
2297 for (TransactionStatus status : transStatusList) {
2298 if (status.getStatus() != TransactionStatus.StatusCommitted) {
2300 System.out.println(status.getStatus());
2305 System.out.println("Found Errors...");
2307 System.out.println("No Errors Found...");
2310 // System.out.println();
2311 // System.out.println();
2314 // System.out.println();
2315 // System.out.println();