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

Intermittent testbed failure in Android DetailedList tests #2185

Open
mhsmith opened this issue Nov 2, 2023 · 3 comments
Open

Intermittent testbed failure in Android DetailedList tests #2185

mhsmith opened this issue Nov 2, 2023 · 3 comments
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior.

Comments

@mhsmith
Copy link
Member

mhsmith commented Nov 2, 2023

When running CI, the testbed app sometimes raises the following failure on Android when running the tests/widgets/test_detailedlist.py::test_refresh test:

I/python.stdout: _________________________________ test_refresh _________________________________
I/python.stdout: Traceback (most recent call last):
I/python.stdout:   File "/data/data/org.beeware.toga.testbed/files/chaquopy/AssetFinder/app/tests/widgets/test_detailedlist.py", line 253, in test_refresh
I/python.stdout:     assert len(widget.data) == 101
I/python.stdout: AssertionError: assert 100 == 101
I/python.stdout:  +  where 100 = len(<toga.sources.list_source.ListSource object at 0x760b3f060b20>)
I/python.stdout:  +    where <toga.sources.list_source.ListSource object at 0x760b3f060b20> = <DetailedList:0x760b3f0bcb50>.data
@mhsmith mhsmith added bug A crash or error in behavior. android The issue relates to Android mobile support. labels Nov 2, 2023
@freakboy3742
Copy link
Member

For anyone getting this error in CI - this error can be ignored; a re-run of the testbed will almost always cause the error to disappear.

It's likely caused by some odd timing in the handling of the refresh event - if the refresh hasn't fully processed, it's possible the new data generated by the refresh hasn't been fully added yet.

freakboy3742 added a commit to freakboy3742/toga that referenced this issue Nov 3, 2023
@freakboy3742
Copy link
Member

freakboy3742 commented Nov 3, 2023

I've added a potential workaround in #2103, merged prior to the release of Toga 0.4.

@freakboy3742 freakboy3742 changed the title Intermittent testbed failure on Android Intermittent DetailedList testbed failure on Android Nov 3, 2023
@freakboy3742 freakboy3742 changed the title Intermittent DetailedList testbed failure on Android Intermittent testbed failure in Android DetailedList tests Nov 3, 2023
@freakboy3742
Copy link
Member

Looks like the potential fix hasn't resolved the problem; it came up again in a CI run on #2218.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

2 participants