1.1 --- a/mdr/test/unit/src/org/netbeans/mdr/test/StorageTest.java Mon Nov 22 16:37:43 2004 +0000
1.2 +++ b/mdr/test/unit/src/org/netbeans/mdr/test/StorageTest.java Mon Nov 22 17:02:10 2004 +0000
1.3 @@ -63,10 +63,10 @@
1.4 Storage storage;
1.5 try {
1.6 // btree storage, singlevalued index
1.7 - System.out.println();
1.8 - System.out.println("*************************************************");
1.9 - System.out.println("btree storage, singlevalued index");
1.10 - System.out.println("-------------------------------------------------");
1.11 + getLog().println();
1.12 + getLog().println("*************************************************");
1.13 + getLog().println("btree storage, singlevalued index");
1.14 + getLog().println("-------------------------------------------------");
1.15 factory = new BtreeFactory();
1.16 storage = factory.createStorage(new HashMap());
1.17 storage.create (true, new Resolver());
1.18 @@ -74,10 +74,10 @@
1.19 doSingleTest(storage, "btree");
1.20
1.21 // memory storage, singlevalued index
1.22 - System.out.println();
1.23 - System.out.println("*************************************************");
1.24 - System.out.println("memory storage, singlevalued index");
1.25 - System.out.println("-------------------------------------------------");
1.26 + getLog().println();
1.27 + getLog().println("*************************************************");
1.28 + getLog().println("memory storage, singlevalued index");
1.29 + getLog().println("-------------------------------------------------");
1.30 factory = new StorageFactoryImpl ();
1.31 storage = factory.createStorage(new HashMap());
1.32 storage.create (true, new Resolver());
1.33 @@ -85,10 +85,10 @@
1.34 doSingleTest(storage, "memory");
1.35
1.36 // btree storage, multivalued index
1.37 - System.out.println();
1.38 - System.out.println("*************************************************");
1.39 - System.out.println("btree storage, multivalued test");
1.40 - System.out.println("-------------------------------------------------");
1.41 + getLog().println();
1.42 + getLog().println("*************************************************");
1.43 + getLog().println("btree storage, multivalued test");
1.44 + getLog().println("-------------------------------------------------");
1.45 factory = new BtreeFactory();
1.46 storage = factory.createStorage(new HashMap());
1.47 storage.create (true, new Resolver());
1.48 @@ -97,10 +97,10 @@
1.49
1.50 /*
1.51 // memory storage, multivalued index
1.52 - System.out.println();
1.53 - System.out.println("*************************************************");
1.54 - System.out.println("memory storage, multivalued test");
1.55 - System.out.println("-------------------------------------------------");
1.56 + getLog().println();
1.57 + getLog().println("*************************************************");
1.58 + getLog().println("memory storage, multivalued test");
1.59 + getLog().println("-------------------------------------------------");
1.60 factory = new StorageFactoryImpl ();
1.61 storage = factory.createStorage(new HashMap());
1.62 storage.create (true, new Resolver());
1.63 @@ -140,7 +140,7 @@
1.64 }
1.65
1.66 totalTime += System.currentTimeMillis() - time;
1.67 - System.out.println("initial insertions time: " + totalTime);
1.68 + getLog().println("initial insertions time: " + totalTime);
1.69 if (index instanceof Btree) {
1.70 TreeMetrics m = ((Btree) index).computeMetrics();
1.71 m.print();
1.72 @@ -168,10 +168,10 @@
1.73 storage.close();
1.74
1.75 totalTime += System.currentTimeMillis() - time;
1.76 - System.out.println();
1.77 - System.out.println(info + ", test time: " + totalTime);
1.78 - System.out.println("#insertions: " + insertions);
1.79 - System.out.println("#deletions: " + deletions);
1.80 + getLog().println();
1.81 + getLog().println(info + ", test time: " + totalTime);
1.82 + getLog().println("#insertions: " + insertions);
1.83 + getLog().println("#deletions: " + deletions);
1.84 }
1.85
1.86 public void doMultiTest(Storage storage, String info) throws StorageException {
1.87 @@ -219,10 +219,10 @@
1.88 storage.close();
1.89
1.90 totalTime += System.currentTimeMillis() - time;
1.91 - System.out.println();
1.92 - System.out.println(info + ", test time: " + totalTime);
1.93 - System.out.println("#insertions: " + insertions);
1.94 - System.out.println("#deletions: " + deletions);
1.95 + getLog().println();
1.96 + getLog().println(info + ", test time: " + totalTime);
1.97 + getLog().println("#insertions: " + insertions);
1.98 + getLog().println("#deletions: " + deletions);
1.99 }
1.100
1.101 /*
1.102 @@ -268,8 +268,8 @@
1.103 storage.close();
1.104
1.105 totalTime += System.currentTimeMillis() - time;
1.106 - System.out.println();
1.107 - System.out.println(info + ", test time: " + totalTime);
1.108 + getLog().println();
1.109 + getLog().println(info + ", test time: " + totalTime);
1.110 }
1.111
1.112 public void doTest2(Storage storage, String info) throws StorageException {
1.113 @@ -304,7 +304,7 @@
1.114 }
1.115 }
1.116 storage.close();
1.117 - System.out.println(info + ", test time: " + (System.currentTimeMillis() - time));
1.118 + getLog().println(info + ", test time: " + (System.currentTimeMillis() - time));
1.119 }
1.120 */
1.121
1.122 @@ -338,7 +338,7 @@
1.123 private class Resolver implements ObjectResolver {
1.124
1.125 public Object resolve(String storageID, Object key) {
1.126 - System.out.println("resolve object called");
1.127 + getLog().println("resolve object called");
1.128 return new Object();
1.129 }
1.130