You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by th...@apache.org on 2003/02/02 10:31:41 UTC
cvs commit: jakarta-ojb/src/test/org/apache/ojb/broker OneToOneTest.java
thma 2003/02/02 01:31:41
Modified: src/test/org/apache/ojb/broker OneToOneTest.java
Log:
add a masstest with 100 operations
Revision Changes Path
1.3 +25 -1 jakarta-ojb/src/test/org/apache/ojb/broker/OneToOneTest.java
Index: OneToOneTest.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/broker/OneToOneTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- OneToOneTest.java 14 Aug 2002 13:22:28 -0000 1.2
+++ OneToOneTest.java 2 Feb 2003 09:31:40 -0000 1.3
@@ -22,7 +22,7 @@
public static void main(String[] args)
{
- String[] arr = {CLASS.getName()};
+ String[] arr = { CLASS.getName()};
junit.textui.TestRunner.main(arr);
}
@@ -40,6 +40,30 @@
public void testRead()
{
+ }
+
+ public void testMassOperations()
+ {
+ for (int i = 100; i < 200; i++)
+ {
+ broker.beginTransaction();
+ ProductGroup pg = new ProductGroup();
+ pg.setId(i);
+ pg.setGroupName("1-1 test productgroup " + i);
+ broker.store(pg);
+ broker.commitTransaction();
+ }
+ for (int i = 100; i < 200; i++)
+ {
+ broker.beginTransaction();
+ Article article = Article.createInstance();
+ article.setArticleId(i);
+ article.setArticleName("1-1 test article " + i);
+ article.setProductGroupId(i);
+ broker.retrieveReference(article, "productGroup");
+ broker.store(article);
+ broker.commitTransaction();
+ }
}
/**