Kami commented on PR #1807:
URL: https://github.com/apache/libcloud/pull/1807#issuecomment-1343470018

   I did some digging in and added timeout for hanging tests and looks like the 
problematic test is the one which was added in this PR (It's also easy to 
reproduce it by just running ``libcloud/test/common/test_google.py`` test file 
directly):
   
   ```bash
   
========================================================================================
 FAILURES 
=========================================================================================
   __________________________________________________ 
GoogleInstalledAppAuthConnectionFirstLoginTest.test_it_aborts_if_state_is_suspicious
 ___________________________________________________
   [gw8] linux -- Python 3.8.0 
/home/kami/w/libcloud/libcloud/.tox/py3.8/bin/python
   
   self = 
<libcloud.test.common.test_google.GoogleInstalledAppAuthConnectionFirstLoginTest
 testMethod=test_it_aborts_if_state_is_suspicious>
   
       def test_it_aborts_if_state_is_suspicious(self):
   >       received_code = self._do_first_sign_in(
               expected_code="1234ABC", state=self.conn._state + "very 
suspicious"
           )
   
   libcloud/test/common/test_google.py:292: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   libcloud/test/common/test_google.py:324: in _do_first_sign_in
       fake_sign_in_thread.join()
   ../../../.pythonz/pythons/CPython-3.8.0/lib/python3.8/threading.py:1011: in 
join
       self._wait_for_tstate_lock()
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   
   self = <Thread(Thread-1, started 140236942829248)>, block = True, timeout = 
-1
   
       def _wait_for_tstate_lock(self, block=True, timeout=-1):
           # Issue #18808: wait for the thread state to be gone.
           # At the end of the thread's life, after all knowledge of the thread
           # is removed from C data structures, C code releases our 
_tstate_lock.
           # This method passes its arguments to _tstate_lock.acquire().
           # If the lock is acquired, the C code is done, and self._stop() is
           # called.  That sets ._is_stopped to True, and ._tstate_lock to None.
           lock = self._tstate_lock
           if lock is None:  # already determined that the C code is done
               assert self._is_stopped
   >       elif lock.acquire(block, timeout):
   E       Failed: Timeout >15.0s
   
   ../../../.pythonz/pythons/CPython-3.8.0/lib/python3.8/threading.py:1027: 
Failed
   
----------------------------------------------------------------------------------
 Captured stdout call 
-----------------------------------------------------------------------------------
   
   Please Go to the following URL and sign in:
   
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=email%40developer.gserviceaccount.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A8087&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffoo&state=Libcloud+Request
   
----------------------------------------------------------------------------------
 Captured stderr call 
-----------------------------------------------------------------------------------
   
   
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Timeout 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Stack of Thread-1 (140236942829248) 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     File 
"/home/kami/.pythonz/pythons/CPython-3.8.0/lib/python3.8/threading.py", line 
890, in _bootstrap
       self._bootstrap_inner()
     File 
"/home/kami/.pythonz/pythons/CPython-3.8.0/lib/python3.8/threading.py", line 
932, in _bootstrap_inner
       self.run()
     File 
"/home/kami/.pythonz/pythons/CPython-3.8.0/lib/python3.8/threading.py", line 
870, in run
       self._target(*self._args, **self._kwargs)
     File "/home/kami/w/libcloud/libcloud/libcloud/test/common/test_google.py", 
line 310, in _get_code
       received_code = self.conn.get_code()
     File "/home/kami/w/libcloud/libcloud/libcloud/common/google.py", line 439, 
in get_code
       code = self._receive_code_through_local_loopback()
     File "/home/kami/w/libcloud/libcloud/libcloud/common/google.py", line 535, 
in _receive_code_through_local_loopback
       server.handle_request()
     File 
"/home/kami/.pythonz/pythons/CPython-3.8.0/lib/python3.8/socketserver.py", line 
294, in handle_request
       ready = selector.select(timeout)
     File 
"/home/kami/.pythonz/pythons/CPython-3.8.0/lib/python3.8/selectors.py", line 
415, in select
       fd_event_list = self._selector.poll(timeout)
   
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Stack of <unknown> (140237122565824) 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     File 
"/home/kami/w/libcloud/libcloud/.tox/py3.8/lib/python3.8/site-packages/execnet/gateway_base.py",
 line 285, in _perform_spawn
       reply.run()
     File 
"/home/kami/w/libcloud/libcloud/.tox/py3.8/lib/python3.8/site-packages/execnet/gateway_base.py",
 line 220, in run
       self._result = func(*args, **kwargs)
     File 
"/home/kami/w/libcloud/libcloud/.tox/py3.8/lib/python3.8/site-packages/execnet/gateway_base.py",
 line 967, in _thread_receiver
       msg = Message.from_io(io)
     File 
"/home/kami/w/libcloud/libcloud/.tox/py3.8/lib/python3.8/site-packages/execnet/gateway_base.py",
 line 432, in from_io
       header = io.read(9)  # type 1, channel 4, payload 4
     File 
"/home/kami/w/libcloud/libcloud/.tox/py3.8/lib/python3.8/site-packages/execnet/gateway_base.py",
 line 400, in read
       data = self._read(numbytes - len(buf))
   
   
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Timeout 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   ______________________________________ 
GoogleInstalledAppAuthConnectionFirstLoginTest.test_it_receives_the_code_that_google_sends_via_local_loopback
 ______________________________________
   [gw8] linux -- Python 3.8.0 
/home/kami/w/libcloud/libcloud/.tox/py3.8/bin/python
   
   self = 
<libcloud.test.common.test_google.GoogleInstalledAppAuthConnectionFirstLoginTest
 testMethod=test_it_receives_the_code_that_google_sends_via_local_loopback>
   
       def test_it_receives_the_code_that_google_sends_via_local_loopback(self):
           expected_code = "1234ABC"
           received_code = self._do_first_sign_in(expected_code=expected_code, 
state=self.conn._state)
   >       self.assertEqual(received_code, expected_code)
   E       AssertionError: None != '1234ABC'
   
   libcloud/test/common/test_google.py:289: AssertionError
   
   ```
   
   I will dig in more later this week and try to fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to