[jboss-cvs] JBossCache/tests-50/functional/org/jboss/cache/pojo ...
Ben Wang
bwang at jboss.com
Mon Jul 17 05:30:02 EDT 2006
User: bwang
Date: 06/07/17 05:30:02
Modified: tests-50/functional/org/jboss/cache/pojo
ObjectGraphTest.java
Log:
upd
Revision Changes Path
1.3 +7 -15 JBossCache/tests-50/functional/org/jboss/cache/pojo/ObjectGraphTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ObjectGraphTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/ObjectGraphTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ObjectGraphTest.java 27 Jun 2006 09:19:31 -0000 1.2
+++ ObjectGraphTest.java 17 Jul 2006 09:30:02 -0000 1.3
@@ -90,14 +90,6 @@
{
// try {Thread.sleep(10000); } catch (Exception e) {};
log.info("testRefCount() ...");
- stage1();
- stage2();
-
- cache_.detach("/person/ben");
- }
-
- private void stage1() throws Exception
- {
Person joe = createPerson("Joe Black", 31);
Person ben = createPerson("Ben Hogan", 51);
cache_.attach("/person/joe", joe);
@@ -115,17 +107,17 @@
Address add2 = (Address) ((Person) cache_.find("/person/ben")).getAddress();
assertEquals("Joe's address should still be valid ", "Sunnyvale", add1.getCity());
assertEquals("Ben's address should still be valid ", "Sunnyvale", add2.getCity());
- }
+ assertEquals(add1.getCity(), add2.getCity());
+ addr.setCity("Santa Clara");
+ assertEquals(add1.getCity(), add2.getCity());
- private void stage2() throws Exception
- {
- //
cache_.detach("/person/joe");
- Person ben = (Person) cache_.find("/person/ben");
- Address addr = ben.getAddress();
- assertEquals("Ben's address should still be valid ", "Sunnyvale", addr.getCity());
+ ben = (Person) cache_.find("/person/ben");
+ addr = ben.getAddress();
addr.setCity("Santa Clara");
assertEquals("Ben's address should be changed ", "Santa Clara", addr.getCity());
+
+ cache_.detach("/person/ben");
}
/**
More information about the jboss-cvs-commits
mailing list