<s> import tempfile <EOL> import unittest <EOL> import os <EOL> import logging <EOL> import ufora . FORA . python . FORA as FORA <EOL> import ufora . test . ClusterSimulation as ClusterSimulation <EOL> import ufora . test . CumulusSimulationUtils as CumulusSimulationUtils <EOL> import ufora . distributed . SharedState . Connections . ViewFactory as ViewFactory <EOL> import ufora . native . CallbackScheduler as CallbackScheduler <EOL> import ufora . cumulus . test . TestBase as TestBase <EOL> class CumulusServiceTests ( unittest . TestCase , TestBase . CumulusTestCases ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> cls . numWorkers = <NUM_LIT:2> <EOL> cls . simulator = ClusterSimulation . Simulator . createGlobalSimulator ( ) <EOL> cls . simulator . startService ( ) <EOL> cls . simulator . verifySharedStateRunning ( ) <EOL> cls . desirePublisher = cls . simulator . desirePublisher <EOL> cls . desirePublisher . desireNumberOfWorkers ( cls . numWorkers ) <EOL> FORA . initialize ( ) <EOL> cls . temporaryDirectoryName = tempfile . mkdtemp ( ) <EOL> cls . temporaryFileName = os . path . join ( cls . temporaryDirectoryName , "<STR_LIT>" ) <EOL> cls . temporaryFileName2 = os . path . join ( cls . temporaryDirectoryName , "<STR_LIT>" ) <EOL> logging . info ( '<STR_LIT>' ) <EOL> cls . gateway = cls . simulator . createCumulusGateway ( cls . simulator . callbackScheduler ) <EOL> logging . info ( '<STR_LIT>' ) <EOL> CumulusSimulationUtils . waitCumulusReady ( cls . gateway , cls . numWorkers ) <EOL> logging . info ( '<STR_LIT>' ) <EOL> @ classmethod <EOL> def tearDownClass ( cls ) : <EOL> cls . simulator . stopService ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import ufora . config . Mainline as Mainline <EOL> Mainline . UnitTestMainline ( [ ] ) </s>
