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

fix: query.map() and query.map_async() hanging with empty result set. #230

Merged
merged 3 commits into from
Nov 6, 2019

Conversation

chrisrossi
Copy link
Contributor

Fixes #227.

@chrisrossi chrisrossi requested a review from cguardia November 1, 2019 15:43
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 1, 2019
@chrisrossi
Copy link
Contributor Author

@cguardia Can you take a look when you get a chance?

@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 5, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 5, 2019
@andrewsg
Copy link
Contributor

andrewsg commented Nov 6, 2019

@chrisrossi I'm seeing this in the Kokoro build failure:


==================================== ERRORS ====================================
_____________________ ERROR at teardown of test_filter_or ______________________

ds_client = <google.cloud.datastore.client.Client object at 0x7f6318196860>
to_delete = [<Key('SomeKind', 5723651571712000), project=precise-truck-742>, <Key('SomeKind', 5160701618290688), project=precise-truck-742>, <Key('SomeKind', 6286601525133312), project=precise-truck-742>]
deleted_keys = {<Key('SomeKind', 6376074283843584), project=precise-truck-742>, <Key('SomeKind', 5540445446733824), project=precise-t...d', 4796636970614784), project=precise-truck-742>, <Key('SomeKind', 6098997353644032), project=precise-truck-742>, ...}

    @pytest.fixture
    def with_ds_client(ds_client, to_delete, deleted_keys):
        # Make sure we're leaving database as clean as we found it after each test
        results = [
            entity
            for entity in all_entities(ds_client)
            if entity.key not in deleted_keys
        ]
        assert not results

        yield ds_client

        if to_delete:
            ds_client.delete_multi(to_delete)
            deleted_keys.update(to_delete)

        not_deleted = [
            entity
            for entity in all_entities(ds_client)
            if entity.key not in deleted_keys
        ]
>       assert not not_deleted
E       AssertionError: assert not [<Entity('SomeKind', 5112361526493184) {'foo': 1, 'bar': 'a'}>]

tests/system/conftest.py:76: AssertionError

@chrisrossi chrisrossi added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2019
@chrisrossi chrisrossi merged commit 0561a34 into googleapis:master Nov 6, 2019
@chrisrossi chrisrossi deleted the fix-227 branch November 6, 2019 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

query.map() and query.map_async() hangs when query returns no results
5 participants