Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unittest fail on riscv64 device #535

Closed
Xunop opened this issue Dec 10, 2023 · 1 comment · Fixed by #536
Closed

unittest fail on riscv64 device #535

Xunop opened this issue Dec 10, 2023 · 1 comment · Fixed by #536
Assignees
Labels
bug This issue is a bug. p3 This is a minor priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@Xunop
Copy link

Xunop commented Dec 10, 2023

Describe the bug

The unittest will fail on riecv64 devices or devices with low performance.

Expected Behavior

Pass all unit tests.

Current Behavior

relevant logs:

======================================================================
FAIL: test_shutdown_complete_singleton (test_io.EventLoopGroupTest.test_shutdown_complete_singleton)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-awscrt/src/aws-crt-python/test/test_io.py", line 41, in test_shutdown_complete_singleton
    self.assertTrue(shutdown_event.wait(TIMEOUT))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 292 tests in 156.700s

FAILED (failures=1, errors=1, skipped=152)

Reproduction Steps

pyver=$(python -c "import sys; print('{}{}'.format(*sys.version_info[:2]))")
export PYTHONPATH="$PWD:$PWD/build/lib.linux-$CARCH-cpython-$pyver"
python -m unittest discover test

Possible Solution

Extension of time limits:

diff --git a/test/__init__.py b/test/__init__.py
index 4b2d44e..50d9313 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -14,7 +14,7 @@ from awscrt.io import init_logging, LogLevel
 import unittest
 import sys
 
-TIMEOUT = 10.0
+TIMEOUT = 30.0
 
 
 class NativeResourceTest(unittest.TestCase):
diff --git a/test/test_http_client.py b/test/test_http_client.py
index a9cb459..b9f413a 100644
--- a/test/test_http_client.py
+++ b/test/test_http_client.py
@@ -359,7 +359,7 @@ class TestClient(NativeResourceTest):
         stream.activate()
 
         # wait for stream to complete (use long timeout, it's a big file)
-        stream_completion_result = stream.completion_future.result(60)
+        stream_completion_result = stream.completion_future.result(80)
 
         # check result
         self.assertEqual(200, response.status_code)

Additional Information/Context

N/A

aws-crt-python version used

v0.19.18

Python version used

3.11.6

Operating System and version

archlinux riscv64

@Xunop Xunop added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 10, 2023
Xunop added a commit to Xunop/archriscv-packages that referenced this issue Dec 10, 2023
Fix check fail, upstreamed to aws-crt-python: awslabs/aws-crt-python#535
felixonmars pushed a commit to felixonmars/archriscv-packages that referenced this issue Dec 10, 2023
Fix check fail, upstreamed to aws-crt-python: awslabs/aws-crt-python#535
@jmklix jmklix self-assigned this Dec 12, 2023
@jmklix jmklix added pending-release This issue will be fixed by an approved PR that hasn't been released yet. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 12, 2023
@jmklix jmklix linked a pull request Dec 12, 2023 that will close this issue
@jmklix
Copy link
Member

jmklix commented Dec 12, 2023

I made a PR to update the timeout as you showed above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p3 This is a minor priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants