[Checkins] SVN: relstorage/trunk/relstorage/ The tests of the new blob storage and cache now pass on Postgres and MySQL

Shane Hathaway shane at hathawaymix.org
Tue Oct 19 21:59:02 EDT 2010


Log message for revision 117784:
  The tests of the new blob storage and cache now pass on Postgres and MySQL
  

Changed:
  U   relstorage/trunk/relstorage/adapters/schema.py
  U   relstorage/trunk/relstorage/tests/testmysql.py
  U   relstorage/trunk/relstorage/tests/testoracle.py
  U   relstorage/trunk/relstorage/tests/testpostgresql.py

-=-
Modified: relstorage/trunk/relstorage/adapters/schema.py
===================================================================
--- relstorage/trunk/relstorage/adapters/schema.py	2010-10-20 01:52:50 UTC (rev 117783)
+++ relstorage/trunk/relstorage/adapters/schema.py	2010-10-20 01:59:02 UTC (rev 117784)
@@ -510,7 +510,7 @@
                         PRIMARY KEY (zoid, chunk_num),
             tid         BIGINT NOT NULL,
             chunk       LONGBLOB NOT NULL
-        );
+        ) ENGINE = InnoDB;
         CREATE INDEX blob_chunk_lookup ON blob_chunk (zoid);
         ALTER TABLE blob_chunk ADD CONSTRAINT blob_chunk_fk
             FOREIGN KEY (zoid)

Modified: relstorage/trunk/relstorage/tests/testmysql.py
===================================================================
--- relstorage/trunk/relstorage/tests/testmysql.py	2010-10-20 01:52:50 UTC (rev 117783)
+++ relstorage/trunk/relstorage/tests/testmysql.py	2010-10-20 01:59:02 UTC (rev 117784)
@@ -185,6 +185,11 @@
                     (shared_blob_dir and 'Shared' or 'Unshared'),
                     (keep_history and 'WithHistory' or 'NoHistory'),
                 )
+
+                # If the blob directory is a cache, don't test packing,
+                # since packing can not remove blobs from all caches.
+                test_packing = shared_blob_dir
+
                 if keep_history:
                     pack_test_name = 'blob_packing.txt'
                 else:
@@ -193,7 +198,7 @@
                 suite.addTest(storage_reusable_suite(
                     prefix, create_storage,
                     test_blob_storage_recovery=True,
-                    test_packing=True,
+                    test_packing=test_packing,
                     test_undo=keep_history,
                     pack_test_name=pack_test_name,
                     ))

Modified: relstorage/trunk/relstorage/tests/testoracle.py
===================================================================
--- relstorage/trunk/relstorage/tests/testoracle.py	2010-10-20 01:52:50 UTC (rev 117783)
+++ relstorage/trunk/relstorage/tests/testoracle.py	2010-10-20 01:59:02 UTC (rev 117784)
@@ -194,6 +194,11 @@
                     (shared_blob_dir and 'Shared' or 'Unshared'),
                     (keep_history and 'WithHistory' or 'NoHistory'),
                 )
+
+                # If the blob directory is a cache, don't test packing,
+                # since packing can not remove blobs from all caches.
+                test_packing = shared_blob_dir
+
                 if keep_history:
                     pack_test_name = 'blob_packing.txt'
                 else:
@@ -202,7 +207,7 @@
                 suite.addTest(storage_reusable_suite(
                     prefix, create_storage,
                     test_blob_storage_recovery=True,
-                    test_packing=True,
+                    test_packing=test_packing,
                     test_undo=keep_history,
                     pack_test_name=pack_test_name,
                     ))

Modified: relstorage/trunk/relstorage/tests/testpostgresql.py
===================================================================
--- relstorage/trunk/relstorage/tests/testpostgresql.py	2010-10-20 01:52:50 UTC (rev 117783)
+++ relstorage/trunk/relstorage/tests/testpostgresql.py	2010-10-20 01:59:02 UTC (rev 117784)
@@ -179,6 +179,11 @@
                     (shared_blob_dir and 'Shared' or 'Unshared'),
                     (keep_history and 'WithHistory' or 'NoHistory'),
                 )
+
+                # If the blob directory is a cache, don't test packing,
+                # since packing can not remove blobs from all caches.
+                test_packing = shared_blob_dir
+
                 if keep_history:
                     pack_test_name = 'blob_packing.txt'
                 else:
@@ -187,7 +192,7 @@
                 suite.addTest(storage_reusable_suite(
                     prefix, create_storage,
                     test_blob_storage_recovery=True,
-                    test_packing=True,
+                    test_packing=test_packing,
                     test_undo=keep_history,
                     pack_test_name=pack_test_name,
                     ))



More information about the checkins mailing list