Skip to content
Snippets Groups Projects
Commit 76e0482f authored by Calen Pennington's avatar Calen Pennington
Browse files

Fix a flaky test caused by caching of UserPartition schemes

parent 0ade461f
No related branches found
No related tags found
No related merge requests found
......@@ -131,6 +131,9 @@ class PartitionTestCase(TestCase):
extensions, namespace=USER_PARTITION_SCHEME_NAMESPACE
)
# Be sure to clean up the global scheme_extensions after the test.
self.addCleanup(self.cleanupSchemeExtensions)
# Create a test partition
self.user_partition = UserPartition(
self.TEST_ID,
......@@ -145,6 +148,9 @@ class PartitionTestCase(TestCase):
self.user_partition.get_scheme(self.non_random_scheme.name)
self.user_partition.get_scheme(self.random_scheme.name)
def cleanupSchemeExtensions(self):
UserPartition.scheme_extensions = None
class TestUserPartition(PartitionTestCase):
"""Test constructing UserPartitions"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment