def setUpClass(cls): # Import needs to happen during EVERY setup to ensure that we are # using the most recently reloaded SmvApp from smv.smvapp import SmvApp cls.sparkContext = TestConfig.sparkContext() cls.sqlContext = TestConfig.sqlContext() cls.sparkContext.setLogLevel("ERROR") import random callback_server_port = random.randint(20000, 65535) args = TestConfig.smv_args() + cls.smvAppInitArgs() + [ '--cbs-port', str(callback_server_port), '--data-dir', cls.tmpDataDir() ] # The test's SmvApp must be set as the singleton for correct results of some tests # The original SmvApp (if any) will be restored when the test is torn down cls.smvApp = SmvApp.createInstance(args, cls.sparkContext, cls.sqlContext) sys.path.append(cls.testResourceDir()) cls.mkTmpTestDir()
def setUp(self): """Patch for Python 2.6 without using unittest """ from smv import SmvApp cls = self.__class__ if not hasattr(cls, 'smvApp'): cls.sparkSession = TestConfig.sparkSession() cls.sparkContext = TestConfig.sparkContext() cls.sparkContext.setLogLevel("ERROR") args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--data-dir', cls.tmpDataDir()] cls.smvApp = SmvApp.createInstance(args, cls.sparkSession)
def setUpClass(cls): from smv.smvapp import SmvApp from test_support.testconfig import TestConfig args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--data-dir', cls.tmpDataDir()] # The test's SmvApp must be set as the singleton for correct results of some tests # The original SmvApp (if any) will be restored when the test is torn down cls.smvApp = SmvApp.createInstance(args, None) sys.path.append(cls.resourceTestDir()) cls.mkTmpTestDir()
def setUpClass(cls): from smv.smvapp import SmvApp cls.sparkSession = TestConfig.sparkSession() cls.sparkContext = TestConfig.sparkContext() cls.sparkContext.setLogLevel("ERROR") args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--data-dir', cls.tmpDataDir()] # set py_module_hotload flag to False so no reload of python files cls.smvApp = SmvApp.createInstance(args, cls.sparkSession, py_module_hotload=False) sys.path.append(cls.resourceTestDir()) cls.mkTmpTestDir()
def setUpClass(cls): from smv.smvapp import SmvApp from test_support.testconfig import TestConfig args = TestConfig.smv_args() + cls.smvAppInitArgs() + [ '--data-dir', cls.tmpDataDir() ] # The test's SmvApp must be set as the singleton for correct results of some tests # The original SmvApp (if any) will be restored when the test is torn down cls.smvApp = SmvApp.createInstance(args, None) sys.path.append(cls.resourceTestDir()) cls.mkTmpTestDir()
def setUp(self): """Patch for Python 2.6 without using unittest """ from smv import SmvApp cls = self.__class__ if not hasattr(cls, 'smvApp'): cls.sparkContext = TestConfig.sparkContext() cls.sqlContext = TestConfig.sqlContext() cls.sparkContext.setLogLevel("ERROR") import random; callback_server_port = random.randint(20000, 65535) args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--cbs-port', str(callback_server_port)] cls.smvApp = SmvApp.createInstance(args, cls.sparkContext, cls.sqlContext)
def setUpClass(cls): # Import needs to happen during EVERY setup to ensure that we are # using the most recently reloaded SmvApp from smv.smvapp import SmvApp cls.sparkSession = TestConfig.sparkSession() cls.sparkContext = TestConfig.sparkContext() cls.sparkContext.setLogLevel("ERROR") args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--data-dir', cls.tmpDataDir()] # The test's SmvApp must be set as the singleton for correct results of some tests # The original SmvApp (if any) will be restored when the test is torn down cls.smvApp = SmvApp.createInstance(args, cls.sparkSession) sys.path.append(cls.resourceTestDir()) cls.mkTmpTestDir()
def setUp(self): """Patch for Python 2.6 without using unittest """ from smv import SmvApp cls = self.__class__ if not hasattr(cls, 'smvApp'): cls.sparkContext = TestConfig.sparkContext() cls.sqlContext = TestConfig.sqlContext() cls.sparkContext.setLogLevel("ERROR") import random callback_server_port = random.randint(20000, 65535) args = TestConfig.smv_args() + cls.smvAppInitArgs() + [ '--cbs-port', str(callback_server_port) ] cls.smvApp = SmvApp.createInstance(args, cls.sparkContext, cls.sqlContext)
def setUpClass(cls): from smv.smvapp import SmvApp cls.sparkSession = TestConfig.sparkSession() cls.sparkContext = TestConfig.sparkContext() cls.sparkContext.setLogLevel("ERROR") args = TestConfig.smv_args() + cls.smvAppInitArgs() + [ '--data-dir', cls.tmpDataDir() ] # set py_module_hotload flag to False so no reload of python files cls.smvApp = SmvApp.createInstance(args, cls.sparkSession, py_module_hotload=False) sys.path.append(cls.resourceTestDir()) cls.mkTmpTestDir()
def setUpClass(cls): # Import needs to happen during EVERY setup to ensure that we are # using the most recently reloaded SmvApp from smv.smvapp import SmvApp cls.sparkContext = TestConfig.sparkContext() cls.sqlContext = TestConfig.sqlContext() cls.sparkContext.setLogLevel("ERROR") import random; callback_server_port = random.randint(20000, 65535) args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--cbs-port', str(callback_server_port), '--data-dir', cls.tmpDataDir()] # The test's SmvApp must be set as the singleton for correct results of some tests # The original SmvApp (if any) will be restored when the test is torn down cls.smvApp = SmvApp.createInstance(args, cls.sparkContext, cls.sqlContext) sys.path.append(cls.resourceTestDir()) cls.mkTmpTestDir()