openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r733055 - in /openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence: datacache/stats/ inheritance/polymorphic/ jdbc/oracle/ query/
Date Fri, 09 Jan 2009 15:06:15 GMT
Author: mikedd
Date: Fri Jan  9 07:06:15 2009
New Revision: 733055

URL: http://svn.apache.org/viewvc?rev=733055&view=rev
Log:
OPENJPA-854 remove hard coded trace levels from testcases. Merge to 1.3.x

Modified:
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/polymorphic/TestTablePerClassInheritanceWithAbstractRoot.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/oracle/TestAutoIncrement.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestNewEntityAsQueryParameter.java

Modified: openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java?rev=733055&r1=733054&r2=733055&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java
(original)
+++ openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java
Fri Jan  9 07:06:15 2009
@@ -37,7 +37,7 @@
 	public void setUp() {
 		super.setUp(CLEAR_TABLES, Customer.class, Order.class,
 				"openjpa.DataCache", "true", "openjpa.RemoteCommitProvider",
-				"sjvm", "openjpa.Log", "DefaultLevel=WARN");
+				"sjvm");
 		startCaching(Customer.class);
 		startCaching(Order.class);
 		assertTrue(((EntityManagerImpl) emf.createEntityManager()).getBroker()
@@ -46,7 +46,7 @@
 		assertNotNull(stats);
 	}
 
-	void startCaching(Class cls) {
+	void startCaching(Class<?> cls) {
 		ClassMetaData meta = emf.getConfiguration()
 				.getMetaDataRepositoryInstance().getMetaData(cls, null, true);
 		meta.setDataCacheName(DataCache.NAME_DEFAULT);
@@ -56,7 +56,8 @@
 	 * Tests that statistics captures correct data under perfect caching
 	 * condition.
 	 */
-	public void testPerfectCache() {
+	@SuppressWarnings("unchecked")
+    public void testPerfectCache() {
 		print(stats);
 		// populate a bunch of customer and order
 		int nCustomer = 20;

Modified: openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/polymorphic/TestTablePerClassInheritanceWithAbstractRoot.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/polymorphic/TestTablePerClassInheritanceWithAbstractRoot.java?rev=733055&r1=733054&r2=733055&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/polymorphic/TestTablePerClassInheritanceWithAbstractRoot.java
(original)
+++ openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/polymorphic/TestTablePerClassInheritanceWithAbstractRoot.java
Fri Jan  9 07:06:15 2009
@@ -48,20 +48,20 @@
  */
 public class TestTablePerClassInheritanceWithAbstractRoot extends
 		SingleEMFTestCase {
-	Class[] UNJOINED_SUBCLASSES = {
+	Class<?>[] UNJOINED_SUBCLASSES = {
 			EnglishParagraph.class, 
 			FrenchParagraph.class, 
 			GermanParagraph.class};
 	
     public void setUp() {
         setUp(CLEAR_TABLES, 
-        		"openjpa.Log", "SQL=TRACE", 
         		Translation.class, BaseEntity.class,
         		EnglishParagraph.class, FrenchParagraph.class, 
         		GermanParagraph.class, Translatable.class);
     }
     
-	public void testConsistency() {
+	@SuppressWarnings("unchecked")
+    public void testConsistency() {
 		OpenJPAEntityManager em = emf.createEntityManager();
 		em.getTransaction().begin();
 		/**
@@ -144,9 +144,9 @@
 	 * Count total number of instances of all the given classes by separate JPQL
 	 * aggregate query. Useful when a base class has unjoined subclasses.
 	 */
-	public int count(Class... classes) {
+	public int count(Class<?>... classes) {
 		int total = 0;
-		for (Class c:classes) {
+		for (Class<?> c:classes) {
 			total += count(c);
 		}
 		return total;

Modified: openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/oracle/TestAutoIncrement.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/oracle/TestAutoIncrement.java?rev=733055&r1=733054&r2=733055&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/oracle/TestAutoIncrement.java
(original)
+++ openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/oracle/TestAutoIncrement.java
Fri Jan  9 07:06:15 2009
@@ -49,8 +49,8 @@
 		if ("testAutoIncrementIdentityWithNamedSequence".equals(getName())) {
 			super.setUp(CLEAR_TABLES, PObject.class,
 			    "openjpa.jdbc.DBDictionary",
-			    "oracle(UseTriggersForAutoAssign=true,autoAssignSequenceName=autoIncrementSequence)",
-			    "openjpa.Log", "SQL=TRACE");
+			    "oracle(UseTriggersForAutoAssign=true," + 
+			    "autoAssignSequenceName=autoIncrementSequence)");
 		} else {
 			super.setUp(CLEAR_TABLES, PObjectNative.class,
 					"openjpa.jdbc.DBDictionary",

Modified: openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestNewEntityAsQueryParameter.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestNewEntityAsQueryParameter.java?rev=733055&r1=733054&r2=733055&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestNewEntityAsQueryParameter.java
(original)
+++ openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestNewEntityAsQueryParameter.java
Fri Jan  9 07:06:15 2009
@@ -47,8 +47,7 @@
 	public static final int MEMBER_COUNT_TOTAL    = 8;
 	
 	public void setUp() throws Exception {
-		super.setUp(CLEAR_TABLES, Osoba.class, Projekt.class,
-				"openjpa.Log", "SQL=TRACE");
+		super.setUp(CLEAR_TABLES, Osoba.class, Projekt.class);
 		createData();
 	}
 	
@@ -110,7 +109,8 @@
 		queryWithParameter(em, projekt1, projekt2);
 	}
 	
-	void queryWithParameter(EntityManager em, Projekt projekt1, Projekt projekt2) {
+	@SuppressWarnings("unchecked")
+    void queryWithParameter(EntityManager em, Projekt projekt1, Projekt projekt2) {
 		String jpql = "SELECT DISTINCT o FROM Osoba o WHERE :projekt MEMBER OF o.projekty";
 		em.getTransaction().begin();
 		Query query = em.createQuery(jpql);



Mime
View raw message