call site 1 for execnet.PopenGateway.exit
test/rsession/testing/test_rsession.py - line 126
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
   def test_setup_teardown_ssh(self):
       hosts = [HostInfo('localhost:%s' % self.dest)]
       setup_events = []
       teardown_events = []
       tmpdir = self.source
       config = py.test.config._reparse([tmpdir])
       hm = HostManager(config, hosts)
       nodes = hm.setup_hosts(setup_events.append)
       hm.teardown_hosts(teardown_events.append, 
->                    [node.channel for node in nodes], nodes)
           
       count_rsyn_calls = [i for i in setup_events 
               if isinstance(i, repevent.HostRSyncing)]
       assert len(count_rsyn_calls) == len([i for i in hosts])
       count_ready_calls = [i for i in setup_events 
               if isinstance(i, repevent.HostRSyncRootReady)]
       assert len(count_ready_calls) == len([i for i in hosts])
           
       # same for teardown events
       teardown_wait_starts = [i for i in teardown_events 
                                   if isinstance(i, repevent.CallStart)]
       teardown_wait_ends = [i for i in teardown_events 
                                   if isinstance(i, repevent.CallFinish)]
       assert len(teardown_wait_starts) == len(hosts)
       assert len(teardown_wait_ends) == len(hosts)
test/rsession/hostmanage.py - line 177
165
166
167
168
169
170
171
172
173
174
175
176
177
   def teardown_hosts(self, reporter, channels, nodes,
                      waiter=lambda : time.sleep(.1), exitfirst=False):
       for channel in channels:
           channel.send(None)
       
       clean = exitfirst
       while not clean:
           clean = True
           for node in nodes:
               if node.pending:
                   clean = False
           waiter()
->     self.teardown_gateways(reporter, channels)
test/rsession/hostmanage.py - line 191
183
184
185
186
187
188
189
190
191
   def teardown_gateways(self, reporter, channels):
       for channel in channels:
           #try:
           try:
               repevent.wrapcall(reporter, channel.waitclose, 1)
           except IOError: # timeout
               # force closing
               channel.close()
->         channel.gateway.exit()