PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  4h^c@sddlZddlZddlZddlmZddlmZddlmZddlmZddlmZdej fdYZ d ej fd YZ d ej fd YZ d ej fdYZ dZedkrejddndS(iN(t DummyOptions(t DummyProcess(t DummyPConfig(t DummyLogger(t DummyEventtPOutputDispatcherTestscBseZdZdZdZddZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(cCsddlm}|dS(Ni(tclear(tsupervisor.eventsR(tselfR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pytsetUp scCsddlm}|dS(Ni(R(RR(RR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttearDownscCsddlm}|S(Ni(tPOutputDispatcher(tsupervisor.dispatchersR (RR ((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt_getTargetClassststdoutcCsDddlm}i|jd6|jd6}|j|||dS(Ni(teventsRtstderri(t supervisorRtProcessCommunicationStdoutEventtProcessCommunicationStderrEventR (RtprocesstchannelR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt_makeOnes  cCsPt}t|dd}t|}|j|}|j|jtdS(Ntprocess1s /bin/process1(RRRRt assertEqualtwritabletFalse(RtoptionstconfigRt dispatcher((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt test_writables   cCsYt}t|dd}t|}|j|}t|_|j|jtdS(NRs /bin/process1( RRRRRtclosedRtreadabletTrue(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_readable_open&s    cCsYt}t|dd}t|}|j|}t|_|j|jtdS(NRs /bin/process1( RRRRR!RRR R(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_readable_closed.s    cCsMt}t|dd}t|}|j|}|jt|jdS(NRs /bin/process1(RRRRt assertRaisestNotImplementedErrorthandle_write_event(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_write_event6s   cCsrt}d|_t|dddd}t|}|j|}|j|jd|j|jddS(NtabcRs /bin/process1tstdout_capture_maxbytesid( Rt readfd_resultRRRRthandle_read_eventtNonet output_buffer(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_read_event=s    cCst}d|_t|dddd}t|}|j|}|j|j|j|jd|j|j d|j |jdS(NtRs /bin/process1R)id( RR*RRRt assertFalseRRR+R,R-t assertTrue(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt%test_handle_read_event_no_data_closesGs    cCst}t|dd}t|}|j|}ytdWn|jnX|jjd}|j|j d|dS(Nttests/testtfoois,uncaptured python exception, closing channel( RRRRt ValueErrort handle_errortloggertdataR1t startswith(RRRRRtresult((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_errorSs   cst}t|dddddd}t|}d|_|j|}t|_dg|j_gfd }d d l m }|j |j j ||j|jtd d }|j|j||j|jd|j|jddS(NRs /bin/process1tstdout_logfiles/tmp/fooR)iithallooocsj|dS(N(tappend(tevent(tL(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pytdoitksi(Rii(RRRtpidRR!t capturemodet capturelogR8RRt subscribet EventTypestPROCESS_COMMUNICATIONttoggle_capturemodeRtlenR(RRRRRRARR?((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt#test_toggle_capturemode_sends_event`s&       cCst}t|dddd}t|}|j|}|j|j|jjdjt |j|jjdj t |j|j jdjt |j|j jdj t dS(NRs /bin/process1R<s/tmp/fooi( RRRRt removelogsRtmainlogthandlerstreopenedR!tremovedtchildlog(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_removelogsvs    cCst}t|dddd}t|}|j|}|j|j|jjdjt |j|j jdjt dS(NRs /bin/process1R<s/tmp/fooi( RRRRt reopenlogsRRPRMRNR!RL(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_reopenlogss    cCst}ddlm}|jj|_t|dddd}t|}|j|}d|_ |j |j |j j dg|j |jj dd |j |j d dS( Ni(tloggersRs /bin/process1R<s/tmp/footais'process1' stdout output: aR/(RRRTt LevelsByNametTRACtloglevelRRRR-t record_outputRRPR8R7(RRRTRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt&test_record_output_log_non_capturemodes     cst}t|dddt}t|}|j|d}d|_gfd}ddlm}|j|j j ||j |j t d d }|j |j||j |jddS( NRs /bin/process1tstdout_events_enabledRshello from stdoutcsj|dS(N(R>(R?(R@(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAsi(Rii(RRR!RRR-RRRERFtPROCESS_LOG_STDOUTRYRRIRR8(RRRRRRARR?((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt2test_record_output_emits_stdout_event_when_enableds      cst}t|dddt}t|}|j|d}d|_gfd}ddlm}|j|j j ||j |j t d dS( NRs /bin/process1R[Rshello from stdoutcsj|dS(N(R>(R?(R@(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAsi(Ri(RRRRRR-RRRERFR\RYRRI(RRRRRRAR((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt;test_record_output_does_not_emit_stdout_event_when_disableds     cst}t|dddt}t|}|j|d}d|_gfd}ddlm}|j|j j ||j |j t d d }|j |j||j |jddS( NRs /bin/process1tstderr_events_enabledRshello from stderrcsj|dS(N(R>(R?(R@(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAsi(Rii(RRR!RRR-RRRERFtPROCESS_LOG_STDERRRYRRIRR8(RRRRRRARR?((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt2test_record_output_emits_stderr_event_when_enableds      cst}t|dddt}t|}|j|d}d|_gfd}ddlm}|j|j j ||j |j t d dS( NRs /bin/process1R_Rshello from stderrcsj|dS(N(R>(R?(R@(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAsi(Ri(RRRRRR-RRRERFR`RYRRI(RRRRRRAR((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt;test_record_output_does_not_emit_stderr_event_when_disableds     cCst}ddlm}|jj|_t|dddddd}t|}|j|}d |_ |j |j |j j d g|j |jj d d dS( Ni(RTRs /bin/process1R<s/tmp/fooR)ids!stdout string longer than a tokenis;'process1' stdout output: stdout string longer than a token(RRRTRVRWRXRRRR-RYRRPR8R7(RRRTRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt7test_record_output_capturemode_string_longer_than_tokens      cCst}t|dddddd}t|}|j|}d|_|j|j|jjg|j|jddS(NRs /bin/process1R<s/tmp/fooR)idRU( RRRRR-RYRRPR8(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt;test_record_output_capturemode_string_not_longer_than_tokens     c sddlm}ddlm}gfd}||||j}|j}|d|}t}ddlm}||_d} t|dd d | d d } t | } |j | } z|| _ | j |j t| d jd|j | j d|j tdd} ddlm}|j | j||j | j| |j | jd|j | jdWdy+| jj| jjtj| Wnttfk rnXXdS(Ni(tProcessCommunicationEvent(REcsj|dS(N(R>(R?(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAsthello(t getLoggers/tmp/logRs /bin/process1R<R)itrR/ii(RR(RReREt BEGIN_TOKENt END_TOKENRtsupervisor.loggersRgRRRR-RYRtopentreadRIRt __class__RRR8RDtcloseRPtostremovetOSErrortIOError(RReRERARiRjR8RRgtlogfileRRRR?R((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt%test_stdout_capturemode_single_buffer sF            c sddlm}ddlm}gfd}|||ddl}t|d|j}|jd}|j}|j}|||||} | j d} | dd} | d d} | d } t }dd l m }||_ d }t |d dd|dd}t|}|j|}z | |_|jg|jjD]}|j^qQ|jt|dj||j|j| t||jtd|j| 7_|j|jtdg|jjD]}|j^q|jt|dj||j|j| t||jtd|j| 7_|jg|jjD]}|j^q|jt|dj|d |jtd d}ddlm}|j|j||j|j||j|jd|j|j|Wdy+|jj|jjt j!|Wnt"t#fk rnXXdS(Ni(Re(REcsj|dS(N(R>(R?(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRA9stlettersit:iii(Rgs/tmp/logRs /bin/process1R<R)i'Rh(RR($RReREtstringtgetattrt ascii_letterstdigitsRiRjtsplitRRkRgRRRR-RYRPRMtflushRRlRmRIRRnRRR8RDRoRpRqRrRs(RReRERARxRvR{RiRjR8tbrokentfirsttsecondtthirdRRgRtRRRtxR?R((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt(test_stdout_capturemode_multiple_buffers5sn            # # ##   cCst}t|_t|dddd}t|}|j|}d}d}||_|j|jt |j j d|j|j j d|t |_||_|j|jt |j j d |j|j j d|dS( NRs /bin/process1R<s/tmp/foos4Hello world... this is longer than a token!s+Hello world... this is longer than a token!iii( RR!t strip_ansiRRRR-RYRRIRPR8R(RRRRRtansitnoansi((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_strip_ansiws"         cCst}t|dd}t|}|j|}|j|j||j|jd|j|jd|j|jd|j|j d|j|j ddS(NRs /bin/process1Ri( RRRRRRRtfdRDR,RLRP(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_ctor_nologfiless  cCst}t|dddd}t|}|j|}|j|j||j|jd|j|jd|j|jd|j|j j t |j|j |j dS(NRs /bin/process1R<s/tmp/fooRi(RRRRRRRRRDR,RLRnRRP(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_ctor_logfile_onlys   cCst}t|dddd}t|}|j|}|j|j||j|jd|j|jd|j|jj t |j|j d|j|j ddS(NRs /bin/process1R)i,Ri(RRRRRRRRRDRnRRLR,RP(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_ctor_capturelog_onlys   cCst}t|dd}t|}|j|}|j|j||j|jd|j|jd|j|jd|j|j d|j|j ddS(NRs /bin/process1Ri( RRRRRRRRRDR,RLRP(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_ctor_nologss  cCst}t|dd}t|}|j|}t|}|j|jd||j|jdd|j|j d|dS(NRs /bin/process1s( RRRRtreprR1R9tassertNotEqualtfindtendswith(RRRRRtdrepr((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt test_reprs    cCstt}t|dd}t|}|j|}|j|j|jt|j|j|jtdS(NRs /bin/process1(RRRRRoRRR!(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt test_closes    ( t__name__t __module__R R R RRR"R#R'R.R2R;RJRQRSRZR]R^RaRbRcRdRuRRRRRRRR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR s<                 , B  tPInputDispatcherTestscBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZRS(cCsddlm}|S(Ni(tPInputDispatcher(R R(RR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR scCsd}|j||dS(Ntstdini(R (RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRscCsGtd}|j|}d|_t|_|j|jtdS(NRU( RR,Rt input_bufferRRRRR!(RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_writable_open_nodatas    cCsGtd}|j|}d|_t|_|j|jtdS(NR/(RR,RRRRRR(RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_writable_open_withdatas    cCsGtd}|j|}d|_t|_|j|jtdS(NRU( RR,RRR!RRRR(RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_writable_closed_nodatas    cCsGtd}|j|}d|_t|_|j|jtdS(NR/( RR,RRR!RRRR(RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_writable_closed_withdatas    cCs5td}|j|}|j|jtdS(N(RR,RRR R(RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt test_readables cCspt}t|dd}t|}|j|}d|_|j|jd|j|jdddS(NRs /bin/process1thallooooi( RRRRRRR&R,twritten(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR's   cCs}t}t|dd}t|}|j|}|j|jd|j|j|jd|j|jidS(NR3s/testR/(RRRRRRR&R(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_write_event_nodata s   cCst}t|dd}t|}|j|}d|_ddl}|j|_|j|j |jd|j |j j dj d|j |j j djddS( NR3s/testRiR/isfd 0 closed, stopped monitorings(stdin)>(RRRRRterrnotEPIPEt write_errorR&RR1R7R8R9R(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt$test_handle_write_event_epipe_raiseds       cCsnt}t|dd}t|}|j|}d|_ddl}|j|_|jt |j dS(NR3s/testRi( RRRRRRtEBADFRR$RrR&(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt'test_handle_write_event_uncaught_raised!s     cCst}t|dd}t|}|j|}d|_dd|_|j|jt|jd|j|j dddS(NR3s/testiRUi2i1i( RRRRt write_acceptRR&RRIR(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt%test_handle_write_event_over_os_limit+s     cCs2td}|j|}|jt|jdS(N(RR,RR$R%R+(RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR.6s cCst}t|dd}t|}|j|}ytdWn|jnX|jjd}|j|j d|dS(NR3s/testR4is,uncaptured python exception, closing channel( RRRRR5R6R7R8R1R9(RRRRRR:((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR;;s   cCst}t|dd}t|}|j|}t|}|j|jd||j|jdd|j|j d|dS(NRs /bin/process1s( RRRRRR1R9RRR(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRHs    cCstt}t|dd}t|}|j|}|j|j|jt|j|j|jtdS(NRs /bin/process1(RRRRRoRRR!(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRTs    (RRR RRRRRRR'RRRRR.R;RR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRs           tPEventListenerDispatcherTestscBs:eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#RS("cCsddlm}|dS(Ni(R(RR(RR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR _scCsddlm}|dS(Ni(R(RR(RR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR cscCsddlm}|S(Ni(tPEventListenerDispatcher(R R(RR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR gscCsd}|j||dS(NRi(R (RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRkscCsPt}t|dd}t|}|j|}|j|jtdS(NRs /bin/process1(RRRRRRR(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRos   cCsYt}t|dd}t|}|j|}t|_|j|jtdS(NRs /bin/process1( RRRRRRRR R!(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR"vs    cCsYt}t|dd}t|}|j|}t|_|j|jtdS(NRs /bin/process1( RRRRR!RRR R(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR#~s    cCsMt}t|dd}t|}|j|}|jt|jdS(NRs /bin/process1(RRRRR$R%R&(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR's   cCst}t|dddd}t|}ddlm}|j|_|j|}|j|_ |j |j d|j |j|j |j |jd|j t|jjd|j |jjd |jdS( NRs /bin/process1R<s/tmp/fooi(tEventListenerStatesR/ii(RRRR Rt ACKNOWLEDGEDtlistener_stateRtREADY_FOR_EVENTS_TOKENR*RR+R,tREADYt state_bufferRIRPR8(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt9test_handle_read_event_calls_handle_listener_state_changes     cCst}d|_t|dd}t|}|j|}|j|jd|j|jdddl m }|j|j j |j dS(NR/Rs /bin/process1i(R(RR*RRRRR+R,RR RRRR(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_read_event_nodatas   cCslt}d|_t|dd}t|}|j|}|j|jd|j|jddS(Nt"supercalifragilisticexpialidociousRs /bin/process1( RR*RRRRR+R,RP(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt%test_handle_read_event_logging_nologss   cCst}d|_t|dddd}t|}|j|}|j|jd|jt|j j d|j|j j dddS(NRRs /bin/process1R<s/tmp/fooii( RR*RRRRR+R,RIRPR8(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt'test_handle_read_event_logging_childlogs    cCst}t|dd}t|}ddlm}|j|}|j|_d|_|j |j d|j |jd|j |j j g|j |j|jdS(NRs /bin/process1i(RtwhateverR/(RRRR RRtUNKNOWNRRRthandle_listener_state_changeR,R7R8(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt.test_handle_listener_state_change_from_unknowns    cCst}t|dd}t|}ddlm}|j|}|j|_d|_|j |j d|j |jd|j |j j dd|j |j|jdS( NRs /bin/process1i(RsREADY R/isprocess1: ACKNOWLEDGED -> READY(RRRR RRRRRRRR,R7R8R(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt7test_handle_listener_state_change_acknowledged_to_readys    cCst}t|dd}t|}ddlm}|j|}|j|_d|_|j |j d|j |jd|j |j j dd|j |j j d d |j |j|jdS( NRs /bin/process1i(RsREADY garbage R/isprocess1: ACKNOWLEDGED -> READYisprocess1: READY -> UNKNOWN(RRRR RRRRRRRR,R7R8R(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt6test_handle_listener_state_change_acknowledged_gobbless    cCst}t|dd}t|}ddlm}|j|}|j|_d|_|j |j d|j |jd|j |j j g|j |j|jdS(NRs /bin/process1i(RtRE(RRRR RRRRRRRR,R7R8(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt>test_handle_listener_state_change_acknowledged_to_insufficients     cCst}t|dd}t|}ddlm}|j|}|j|_d|_|j |j d|j |jd|j |j j dd|j |j j d d |j |j|jdS( NRs /bin/process1i(Rs bogus data yoR/is!process1: ACKNOWLEDGED -> UNKNOWNisprocess1: has entered the UNKNOWN state and will no longer receive events, this usually indicates the process violated the eventlistener protocol(RRRR RRRRRRRR,R7R8R(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt9test_handle_listener_state_change_acknowledged_to_unknowns    cCst}t|dd}t|}ddlm}|j|}|j|_d|_|j |j d|j |jd|j |j j dd|j |j j d d |j |j|jdS( NRs /bin/process1i(Rs bogus data yoR/isprocess1: READY -> UNKNOWNisprocess1: has entered the UNKNOWN state and will no longer receive events, this usually indicates the process violated the eventlistener protocol(RRRR RRRRRRRR,R7R8R(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt2test_handle_listener_state_change_ready_to_unknown s    cCst}t|dd}t|}ddlm}|j|}|j|_d|_|j |j d|j |jd|j |j|jdS(NRs /bin/process1i(Rs bogus data yo( RRRR RRtBUSYRRRRR,(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt6test_handle_listener_state_change_busy_to_insufficients    cCst}t|dd}t|}ddlm}|j|}|j|_dddY}||_||j_ ddlm }||jj _ d|_ |j |jd|j |j d |j |jjd d |j |jjd d |j |j|jdS(NRs /bin/process1i(RtDummycBseZRS((RR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR0s(tdefault_handlersRESULT 2 OKabcR(isprocess1: event was processedisprocess1: BUSY -> ACKNOWLEDGED((RRRR RRRRtgroupRRtresult_handlerRRRR,R7R8R(RRRRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt<test_handle_listener_state_change_busy_to_acknowledged_procd)s(      cCst}t|dd}t|}ddlm}|j|}|j|_dddY}||_||j_ ddlm }||jj _ d|_ |j |jd|j |j d |j |jjd d |j |jjd d |j |j|jdS(NRs /bin/process1i(RRcBseZRS((RR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRGs(RsRESULT 4 FAILabcR(isprocess1: event was rejectedisprocess1: BUSY -> ACKNOWLEDGED((RRRR RRRRRRRRRRRR,R7R8R(RRRRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt?test_handle_listener_state_change_busy_to_acknowledged_rejected@s(      c snddlm}ddlm}gfd}|||t}t|dd}t|}ddlm}|j|}|j |_ t } | |_ d|_ |j|jd|j|j d |j|jjd d |j|jjd d |j|jjdd|j|j |j|jd j||jd j | dS(Ni(tEventRejectedEvent(REcsj|dS(N(R>(R?(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRA[sRs /bin/process1(Rs bogus data R/is'process1: bad result line: 'bogus data'isprocess1: BUSY -> UNKNOWNisprocess1: has entered the UNKNOWN state and will no longer receive events, this usually indicates the process violated the eventlistener protocol(RRRERRRR RRRRRR?RRRR,R7R8RR( RRRERARRRRRt current_event((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt1test_handle_listener_state_change_busy_to_unknownWs4         cCsSt}t|dd}t|}ddlm}|j|}|j|_dddY}||_||j_ ddlm }||jj _ d|_ |j |jd|j |j d |j |jjd d |j |jjd d |j |jjdd|j |jjdd|j |j|jdS(NRs /bin/process1i(RRcBseZRS((RR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR}s(RsRESULT 2 OKbogus data R/isprocess1: event was processedisprocess1: BUSY -> ACKNOWLEDGEDis!process1: ACKNOWLEDGED -> UNKNOWNisprocess1: has entered the UNKNOWN state and will no longer receive events, this usually indicates the process violated the eventlistener protocol((RRRR RRRRRRRRRRRR,R7R8R(RRRRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt'test_handle_listener_state_busy_gobblesvs0      c sNddlm}t}t|dd}t|}gfd}ddlm}||j|ddlm }|j |}d} d dd Y} | |_ | |j _ | |j j _ |j|_|jd |jtd |j|j|j|j|jjd d |j|jjdddS(Ni(RERs /bin/process1csj|dS(N(R>(R?(R@(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAs(R(RcSsdS(N((R?R:((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pythandlesRcBseZRS((RR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRsR4isprocess1: event was processedisprocess1: BUSY -> ACKNOWLEDGED((RRERRRRRRR RRRRRRRt handle_resultRRIRR7R8( RRERRRRARRRRR((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_result_accepts0        c shddlm}t}t|dd}t|}gfd}ddlm}||j|ddlm }|j |}d} d dd Y} | |_ | |j _ | |j j _ |j|_|jd |jtd |jd j|j|j|j|j|j|jjd d|j|jjd ddS(Ni(RERs /bin/process1csj|dS(N(R>(R?(R@(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAs(R(RcSs ddlm}||dS(Ni(t RejectEvent(R R(R?R:R((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pytrejectedsRcBseZRS((RR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRsR4iisprocess1: event was rejectedsprocess1: BUSY -> ACKNOWLEDGED((RRERRRRRRR RRRRRRRRRRIRnRR7R8( RRERRRRARRRRR((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_result_rejectevents2        c sddlm}t}t|dd}t|}gfd}ddlm}||j|ddlm }|j |}d} d dd Y} | |_ | |j _ | |j j _ | |j _ |j|_|jd |jtd |jd j|j|j|j|j|j|jjd d|j|jjd d|j|jjdddS(Ni(RERs /bin/process1csj|dS(N(R>(R?(R@(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRAs(R(RcSs tdS(N(R5(R?R:((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt exceptionsRcBseZRS((RR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRsR4iisprocess1: event caused an errorsprocess1: BUSY -> UNKNOWNisprocess1: has entered the UNKNOWN state and will no longer receive events, this usually indicates the process violated the eventlistener protocol((RRERRRRRRR RRRRRRRRRRIRnRR7R8( RRERRRRARRRRR((R@sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_handle_result_exceptions8         cCst}t|dd}t|}|j|}ytdWn|jnX|jjd}|j|j d|dS(NR3s/testR4is,uncaptured python exception, closing channel( RRRRR5R6R7R8R1R9(RRRRRR:((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR;s   cCst}t|dddd}t|}|j|}|j|j|jjdjt |j|jjdj t dS(NRs /bin/process1R<s/tmp/fooi( RRRRRKRRPRMRNR!RO(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRQs    cCsgt}t|dddd}t|}|j|}|j|j|jjdjt dS(NRs /bin/process1R<s/tmp/fooi( RRRRRRRRPRMRNR!(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRS s    cCst}t|_t|dddd}t|}|j|}d}d}||_|j|jt |j j d|j|j j d|t |_||_|j|jt |j j d |j|j j d|dS( NRs /bin/process1R<s/tmp/foos4Hello world... this is longer than a token!s+Hello world... this is longer than a token!iii( RR!RRRRR*R+RRIRPR8R(RRRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRs"         cCst}t|dd}t|}|j|}|j|j||j|jd|j|jd|j|jddS(NRs /bin/process1Ri( RRRRRRRRRPR,(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR(s  cCst}t|dddd}t|}|j|}|j|j||j|jd|j|jd|j|jj t dS(NRs /bin/process1R<s/tmp/fooRi( RRRRRRRRRPRnR(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR2s   cCst}t|dd}t|}|j|}t|}|j|jd||j|jdd|j|j d|dS(NRs /bin/process1s( RRRRRR1R9RRR(RRRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR=s    cCstt}t|dd}t|}|j|}|j|j|jt|j|j|jtdS(NRs /bin/process1(RRRRRoRRR!(RRRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRIs    ($RRR R R RRR"R#R'RRRRRRRRRRRRRRRRRRR;RQRSRRRRR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyR^sD                     #  tstripEscapeTestscBs,eZdZdZdZdZRS(cCsddlm}||S(Ni(t stripEscapes(R R(RtsR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt_callFUTUscCs|j|jdddS(NR/(RR(R((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyttest_zero_length_stringYscCs)d}d}|j|j||dS(Ns4Hello world... this is longer than a token!s+Hello world... this is longer than a token!(RR(RRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt test_ansi\scCs#d}|j|j||dS(Ns+Hello world... this is longer than a token!(RR(RR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt test_noansias(RRRRRR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyRTs   cCstjtjtS(N(tunittestt findTestCasestsystmodulesR(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyt test_suiteest__main__t defaultTestR(RRpRtsupervisor.tests.baseRRRRRtTestCaseRRRRRRtmain(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_dispatchers.pyts