[jboss-user] [JBossCache] - Re: Endless loop in JBoss Cache 1.4.1.GA

msteiner do-not-reply at jboss.com
Mon Mar 5 10:04:49 EST 2007


Add this method to org.jboss.cache.transaction.TransactionTest from cache 1.4.1.SP2 src dist. It causes endless loop

   public void testEndlessLoop() {
  | 		try {
  | 			Fqn root = new Fqn();
  | 			Fqn fqn = new Fqn(root, 1L);
  | 			//put first time
  | 			tx.begin();
  | 			this.cache.put(fqn, "k", "v");
  | 			tx.commit();
  | 
  | 			//get works fine
  | 			tx.begin();
  | 			assertEquals("v", this.cache.get(fqn, "k"));
  | 			tx.commit();
  | 
  | 			//remove all
  | 			tx.begin();
  | 			this.cache.remove(root);
  | 			tx.commit();
  | 
  | 			//get returns null - ok
  | 			//put - endless loop
  | 			tx.begin();
  | 			assertNull(this.cache.get(fqn, "k"));
  | 			this.cache.put(fqn, "k", "v");
  | 			tx.commit();
  | 			
  | 		} catch (Throwable t) {
  | 			t.printStackTrace();
  | 			fail(t.toString());
  | 		}
  | 	}

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025077#4025077

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025077



More information about the jboss-user mailing list