def test_process_exec_response(self): exeThread = ExecThread(None, 'dummy') exeThread.setTimeout(0) msg_header = '[AGENT_MESSAGE]{"errorMsg": "' msg_line1 = 'line 1' msg_line2 = 'line 2' msg_line3 = 'line 3' msg_footer = '"}' exeThread.processExecResponse(msg_header) exeThread.processExecResponse(msg_line1) exeThread.processExecResponse(msg_line2) exeThread.processExecResponse(msg_line3) exeThread.processExecResponse(msg_footer)
print int(time.time()) % 2 response = json.loads(ERROR) isValid = ExecThread.validateResponse(response) errorMsgRe = re.compile('.*errorMsg\".*:.*\"(.*)\"}') match = errorMsgRe.match(ERROR) if (match != None): errorMsg = match.group(1) errorlines = ERROR.split('\n') errorjoin = None ethread = ExecThread(NullThreadMgr, 'agent') for line in errorlines: ethread.processExecResponse(line) line = line.rstrip('\n') errorjoin = line if not errorjoin else (errorjoin + '\\n' + line) threadjson = ethread.getResponse() exc = AgentException('1', 'test'); errorMsg = exc.getMsg() config = ConfigParser.RawConfigParser() config.read('fact.prop') env_vs = 'CRONUSAPP_HOME=%s LCM_CORRELATIONID=%s'.split(' ') text = 'some' text1 = text.split()
print int(time.time()) % 2 response = json.loads(ERROR) isValid = ExecThread.validateResponse(response) errorMsgRe = re.compile('.*errorMsg\".*:.*\"(.*)\"}') match = errorMsgRe.match(ERROR) if (match != None): errorMsg = match.group(1) errorlines = ERROR.split('\n') errorjoin = None ethread = ExecThread(NullThreadMgr, 'agent') for line in errorlines: ethread.processExecResponse(line) line = line.rstrip('\n') errorjoin = line if not errorjoin else (errorjoin + '\\n' + line) threadjson = ethread.getResponse() exc = AgentException('1', 'test') errorMsg = exc.getMsg() config = ConfigParser.RawConfigParser() config.read('fact.prop') env_vs = 'CRONUSAPP_HOME=%s LCM_CORRELATIONID=%s'.split(' ') text = 'some' text1 = text.split() print os.path.dirname(