Преглед на файлове

[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 години
родител
ревизия
605ea11
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  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()
           databases = db.get_databases()
           assert_false(db_name in databases)
           assert_false(db_name in databases)
 
 
+      global _INITIALIZED
+      _INITIALIZED = False
+
   @classmethod
   @classmethod
   def init_beeswax_db(cls):
   def init_beeswax_db(cls):
     """
     """