[java-opensaml COMMIT] /trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java
noreply at shibboleth.net
noreply at shibboleth.net
Wed Oct 21 22:56:13 EDT 2015
Author: dfisher
Date: Wed Oct 21 22:56:13 2015
New Revision: 4354
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4354&view=rev
Log:
Add test for long string.
Disable the test until hsqldb can support the length.
Modified:
trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java
Modified: trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java?rev=4354&r1=4353&r2=4354&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java (original)
+++ trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java Wed Oct 21 22:56:13 2015
@@ -21,6 +21,7 @@
import java.security.SecureRandom;
import java.util.Collections;
import java.util.List;
+import java.util.UUID;
import javax.annotation.Nonnull;
import javax.persistence.EntityManagerFactory;
@@ -142,4 +143,17 @@
boolean result = shared.create(context, "mt", "qux", null);
Assert.assertFalse(result, "createString should have failed");
}
+
+ @Test(enabled = false)
+ public void largeValue() throws IOException {
+ // hsqldb defaults LOB length to 255 chars; disabled for now
+ StringBuilder sb = new StringBuilder(1000 * 36);
+ for (int i = 0; i < 1000; i++) {
+ sb.append(UUID.randomUUID());
+ }
+ shared.create("unit_test", "large", sb.toString(), System.currentTimeMillis() + 300000);
+ StorageRecord rec = shared.read("unit_test", "large");
+ Assert.assertNotNull(rec);
+ Assert.assertEquals(sb.toString(), rec.getValue());
+ }
}
More information about the commits
mailing list