Fix a test method that crashes pytest with multithreading
@@ -80,6 +80,7 @@ class Sqlite3CheckpointStore(CheckpointStore):
self.conn = conn
def list_ownership(self, fully_qualified_namespace, eventhub_name, consumer_group):
+ with self._lock:
cursor = self.conn.cursor()
try:
cursor.execute("select " + ",".join(self.ownership_fields) +
@@ -153,6 +154,7 @@ class Sqlite3CheckpointStore(CheckpointStore):
cursor.close()
def list_checkpoints(self, fully_qualified_namespace, eventhub_name, consumer_group):
+ with self._lock:
cursor = self.conn.cursor()
try:
cursor.execute("select "
