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

test_deck_present failing #14

Open
ataffanel opened this issue Aug 2, 2021 · 3 comments
Open

test_deck_present failing #14

ataffanel opened this issue Aug 2, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@ataffanel
Copy link
Member

The test_deck_present test is failing with the error:

        for deck in test_setup.device.decks:
>           assert deck in discovered
E           AssertionError: assert 'bcLighthouse4' in []

I cannot reproduce the problem in my end, it fails on assert test_setup.device.connect_sync() for me.

I am going to push a change that skips this test for now so that we can keep testing the rest.

ataffanel added a commit that referenced this issue Aug 2, 2021
jonasdn added a commit that referenced this issue Aug 9, 2021
@jonasdn
Copy link
Contributor

jonasdn commented Aug 30, 2021

So, I can reproduce this, by going from the rpi:

CRAZY_SITE=crazylab-malmö py.test-3 --verbose tests/QA/test_decks.py

But only if the following commit is not reverted: bitcraze/crazyflie-lib-python@e54c065

So something needs to be fixed there!

@jonasdn
Copy link
Contributor

jonasdn commented Aug 30, 2021

The following patch seem to fix that test:

diff --git a/tests/QA/test_decks.py b/tests/QA/test_decks.py
index 59f2232..c0e5b34 100644
--- a/tests/QA/test_decks.py
+++ b/tests/QA/test_decks.py
@@ -40,15 +40,13 @@ class TestDecks:
             if int(value) == 1:
                 discovered.append(name.rsplit('.')[-1])  # deck.name => name
 
-        assert test_setup.device.connect_sync()
-
         test_setup.device.cf.param.add_update_callback(
             group='deck',
             name=None,
             cb=deck_param_callback
         )
 
-        time.sleep(3)
+        assert test_setup.device.connect_sync()
 
         for deck in test_setup.device.decks:
             assert deck in discovered

Are we breaking API? Since I do not think we require subscribing to update callbacks after connect before this commit?

@jonasdn
Copy link
Contributor

jonasdn commented Aug 30, 2021

The basicparam.py example breaks by the commit above as well, since it connects before setting the callback.

jonasdn pushed a commit that referenced this issue Oct 4, 2021
jonasdn added a commit that referenced this issue Oct 4, 2021
@knmcguire knmcguire added the bug Something isn't working label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants