def disabled_testBuilddManagerLoggingNoRotation(self): # The twistd process does not perform its own rotation. # By default twistd will rotate log files that grow beyond # 1000000 bytes but this is deactivated for the buildd manager. test_setup = BuilddManagerTestSetup() logfilepath = test_setup.logfile rotated_logfilepath = logfilepath + '.1' # Prefill the log file to just under 1000000 bytes. test_setup.precreateLogfile( "2010-07-27 12:36:54+0200 [-] Starting scanning cycle.\n", 18518) self.useFixture(test_setup) # The process logs to the logfile. self.assertTrue(is_file_growing(logfilepath)) # No rotation occured. self.assertFalse(os.access(rotated_logfilepath, os.F_OK), "Twistd's log file was rotated by twistd.")
def disabled_testBuilddManagerLoggingNoRotation(self): # The twistd process does not perform its own rotation. # By default twistd will rotate log files that grow beyond # 1000000 bytes but this is deactivated for the buildd manager. test_setup = BuilddManagerTestSetup() logfilepath = test_setup.logfile rotated_logfilepath = logfilepath + '.1' # Prefill the log file to just under 1000000 bytes. test_setup.precreateLogfile( "2010-07-27 12:36:54+0200 [-] Starting scanning cycle.\n", 18518) self.useFixture(test_setup) # The process logs to the logfile. self.assertTrue(is_file_growing(logfilepath)) # No rotation occured. self.assertFalse( os.access(rotated_logfilepath, os.F_OK), "Twistd's log file was rotated by twistd.")
def disabled_testBuilddManagerLogging(self): # The twistd process logs as execpected. test_setup = self.useFixture(BuilddManagerTestSetup()) logfilepath = test_setup.logfile # The process logs to its logfile. self.assertTrue(is_file_growing(logfilepath)) # After rotating the log, the process keeps using the old file, no # new file is created. rotated_logfilepath = logfilepath + '.1' os.rename(logfilepath, rotated_logfilepath) self.assertTrue(is_file_growing(rotated_logfilepath)) self.assertFalse(os.access(logfilepath, os.F_OK)) # Upon receiving the USR1 signal, the process will re-open its log # file at the old location. test_setup.sendSignal(signal.SIGUSR1) self.assertTrue(is_file_growing(logfilepath)) self.assertTrue(os.access(rotated_logfilepath, os.F_OK))
def testBuilddManagerRuns(self): # The `buildd-manager.tac` starts and stops correctly. fixture = BuilddManagerTestSetup() fixture.setUp() fixture.tearDown() self.layer.force_dirty_database()
def testBuilddManagerRuns(self): # The `buildd-manager.tac` starts and stops correctly. fixture = BuilddManagerTestSetup() fixture.setUp() fixture.tearDown() self.layer.force_dirty_database()