bamthomas / aioimaplib

Python asyncio IMAP4rev1 client library
GNU General Public License v3.0
138 stars 59 forks source link

Test failure on aarch64 #32

Closed dotlambda closed 4 years ago

dotlambda commented 6 years ago

When I run the test suite (python setup.py test) on a 64-bit ARM machine running NixOS and Python 3.6, I get the following error:

======================================================================
FAIL: test_idle_start__exits_queueget_without_timeout_error (aioimaplib.tests.test_aioimaplib.TestAioimaplibClocked)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/q4mxm1959nr9bh6vmbml6f5vr0phfgh8-python3.6-asynctest-0.11.1/lib/python3.6/site-packages/asynctest/case.py", line 294, in run
    self._run_test_method(testMethod)
  File "/nix/store/q4mxm1959nr9bh6vmbml6f5vr0phfgh8-python3.6-asynctest-0.11.1/lib/python3.6/site-packages/asynctest/case.py", line 351, in _run_test_method
    self.loop.run_until_complete(result)
  File "/nix/store/q4mxm1959nr9bh6vmbml6f5vr0phfgh8-python3.6-asynctest-0.11.1/lib/python3.6/site-packages/asynctest/case.py", line 221, in wrapper
    return method(*args, **kwargs)
  File "/nix/store/4yfkb61l14x37pkqdmg4ck61xh5wg49z-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
  File "/build/source/aioimaplib/tests/test_aioimaplib.py", line 852, in test_idle_start__exits_queueget_without_timeout_error
    self.assertEqual(STOP_WAIT_SERVER_PUSH, r)
AssertionError: 'stop_wait_server_push' != ['OK Still here', 'OK Still here', 'OK St[1263 chars]ere']
-------------------- >> begin captured logging << --------------------
asyncio: DEBUG: Using selector: EpollSelector
--------------------- >> end captured logging << ---------------------

Do you know the reason for this?

See also https://hydra.nixos.org/build/68772894/log.

dotlambda commented 6 years ago

Btw, there are even more failures on Darwin: https://hydra.nixos.org/build/68775014/log Nevertheless, tests are running without a problem on x86_64.

bamthomas commented 6 years ago

Sorry for this very late response, I've been a bit overwhelm with my job. No I don't know the reason. At first sight, I'm wondering about charset management, that was often the case for this literal length failures.

aliceh75 commented 6 years ago

The same test is failing here with Python 3.5 on an x86_64 Ubuntu 16.04 box. It doesn't always fail - there's a timing issue - but it does most of the time.

I've had a look at it, and I can say the following is happening:

I don't know yet whether it is expected that IdleCommand.flush can be invoked after IMAP4.stop_wait_server_push. Depending on that, there is either a problem in the code, or a problem in the test.

I won't have time to look at it more for a few days, so if anyone has some further insights feel free to continue working on this one :-)

bamthomas commented 6 years ago

the test aioimaplib.tests.test_aioimaplib.TestAioimaplibClocked is always failing on travis with ubuntu 14.04 / python 3.5.5 installed from tarball. It has passed 10 times on my laptop xubuntu 16.04 with python 3.6.3 installed from ppa jonathonf/python-3.6 . It has passed also with python 3.5.2

I'm wondering if it is related to https://github.com/bamthomas/aioimaplib/issues/30