Jelajahi Sumber

[beeswax] Reset INITIALIZED global for metastore tests

beeswax and metastore both require BeeswaxSampleProvider init_beeswax_db method to run and create the required Hive DBs and tables
The global _INITIALIZED flag gets set after the first init, then beeswax tears down the tables after running its tests, and the 2nd run (metastore) checks if it’s set and if so, exits early
This resets the _INITIALIZED flag on the teardown
Jenny Kim 10 tahun lalu
induk
melakukan
605ea11
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      apps/beeswax/src/beeswax/test_base.py

+ 3 - 0
apps/beeswax/src/beeswax/test_base.py

@@ -364,6 +364,9 @@ class BeeswaxSampleProvider(object):
           databases = db.get_databases()
           assert_false(db_name in databases)
 
+      global _INITIALIZED
+      _INITIALIZED = False
+
   @classmethod
   def init_beeswax_db(cls):
     """