cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [2/2] cayenne git commit: Use soft retain strategy Add CharacterValueType
Date Tue, 03 Oct 2017 11:18:31 GMT
Use soft retain strategy
Add CharacterValueType


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/b0e21718
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/b0e21718
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/b0e21718

Branch: refs/heads/master
Commit: b0e2171877f2e000be95c85b1db88787cf424263
Parents: 53ece1e
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Tue Oct 3 14:18:14 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Tue Oct 3 14:18:14 2017 +0300

----------------------------------------------------------------------
 .../org/apache/cayenne/unit/di/server/ServerCaseModule.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/b0e21718/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
index 560ce3b..df41189 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
@@ -31,6 +31,7 @@ import org.apache.cayenne.access.types.ByteArrayType;
 import org.apache.cayenne.access.types.ByteType;
 import org.apache.cayenne.access.types.CalendarType;
 import org.apache.cayenne.access.types.CharType;
+import org.apache.cayenne.access.types.CharacterValueType;
 import org.apache.cayenne.access.types.DateType;
 import org.apache.cayenne.access.types.DefaultValueObjectTypeRegistry;
 import org.apache.cayenne.access.types.DoubleType;
@@ -151,7 +152,10 @@ public class ServerCaseModule implements Module {
                 .put(FrontBaseAdapter.class.getName(), FrontBaseUnitDbAdapter.class.getName())
                 .put(IngresAdapter.class.getName(), IngresUnitDbAdapter.class.getName())
                 .put(SQLiteAdapter.class.getName(), SQLiteUnitDbAdapter.class.getName());
-        ServerModule.contributeProperties(binder);
+        ServerModule.contributeProperties(binder)
+                // Use soft references instead of default weak.
+                // Should remove problems with random-failing tests (those that are GC-sensitive).
+                .put(Constants.SERVER_OBJECT_RETAIN_STRATEGY_PROPERTY, "soft");
         
         // configure extended types
         ServerModule.contributeDefaultTypes(binder)
@@ -179,7 +183,8 @@ public class ServerCaseModule implements Module {
                 .add(UUIDValueType.class)
                 .add(LocalDateValueType.class)
                 .add(LocalTimeValueType.class)
-                .add(LocalDateTimeValueType.class);
+                .add(LocalDateTimeValueType.class)
+                .add(CharacterValueType.class);
         binder.bind(ValueObjectTypeRegistry.class).to(DefaultValueObjectTypeRegistry.class);
 
         binder.bind(SchemaBuilder.class).to(SchemaBuilder.class);


Mime
View raw message