ozeigermann    2004/06/03 06:33:39

  Modified:    transaction/src/test/org/apache/commons/transaction/memory
                        MapWrapperTest.java
  Log:
  Fixed wrong sync
  
  Revision  Changes    Path
  1.3       +5 -9      
jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory/MapWrapperTest.java
  
  Index: MapWrapperTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory/MapWrapperTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MapWrapperTest.java       2 Jun 2004 20:59:23 -0000       1.2
  +++ MapWrapperTest.java       3 Jun 2004 13:33:39 -0000       1.3
  @@ -111,20 +111,16 @@
   
           final RendezvousBarrier commitBarrier =
               new RendezvousBarrier("Commit", 2, BARRIER_TIMEOUT, sLogger);
  -        final RendezvousBarrier startBarrier =
  -            new RendezvousBarrier("Start", 2, BARRIER_TIMEOUT, sLogger);
   
           Thread thread1 = new Thread(new Runnable() {
               public void run() {
                   txMap1.startTransaction();
                   try {
                       txMap1.put("key1", "value2");
  -                    startBarrier.meet();
                       txMap1.commitTransaction();
                       commitBarrier.meet();
                   } catch (InterruptedException e) {
                        logger.log(Level.WARNING, "Thread interrupted", e);
  -                                     startBarrier.reset();
                                        commitBarrier.reset();
                   }
               }
  @@ -132,10 +128,10 @@
   
                txMap1.put("key1", "value1");
   
  -        thread1.start();
   
           txMap1.startTransaction();
  -        startBarrier.meet();
  +             thread1.start();
  +
           // before commit of other thread
           report("value1", (String) txMap1.get("key1"));
           commitBarrier.meet();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to