public void testSimpleOut() throws Exception { Object o =Boolean.TRUE; sp.out ("testSimpleOut_Key", o); Object o1 = sp.in ("testSimpleOut_Key"); assertTrue (o.equals (o1)); } public void testOutRdpInpRdp() throws Exception {
public void testMultiKeyLoad() throws Exception { String s = "The quick brown fox jumped over the lazy dog"; Profiler prof = new Profiler (); for (int i=0; i<COUNT; i++) { sp.out ("testMultiKeyLoad_Key" + Integer.toString (i), s); if (i % 100 == 0) prof.checkPoint ("out " + i); } // prof.dump (System.err, "MultiKeyLoad out >"); prof = new Profiler (); for (int i=0; i<COUNT; i++) { assertTrue (s.equals (sp.in ("testMultiKeyLoad_Key" + Integer.toString (i)))); if (i % 100 == 0) prof.checkPoint ("in " + i); } // prof.dump (System.err, "MultiKeyLoad in >"); } public void testNoAutoCommit () throws Exception {
public void testSingleKeyLoad() throws Exception { String s = "The quick brown fox jumped over the lazy dog"; String k = "testSingleKeyLoad_Key"; Profiler prof = new Profiler (); for (int i=0; i<COUNT; i++) { sp.out (k, s); if (i % 100 == 0) prof.checkPoint ("out " + i); } // prof.dump (System.err, "SingleKeyLoad out >"); prof = new Profiler (); for (int i=0; i<COUNT; i++) { assertTrue (s.equals (sp.in (k))); if (i % 100 == 0) prof.checkPoint ("in " + i); } // prof.dump (System.err, "SingleKeyLoad in >"); assertTrue (sp.rdp (k) == null); } public void testTemplate () throws Exception {
sp.setAutoCommit (false); for (int i=0; i<COUNT; i++) { assertTrue (s.equals (sp.in ("testNoAutoCommit_Key" + Integer.toString (i)))); if (i % 100 == 0) prof.checkPoint ("in " + i);