Skip to content

Conversation

@whistler
Copy link
Contributor

@whistler whistler commented Jan 6, 2023

Remove the assumption that only the current test is modifying data stores for dataset integration tests. Tested on staging.
Screenshot 2023-01-18 at 9 56 11 PM

@whistler whistler self-assigned this Jan 6, 2023
Copy link
Contributor

@apollonin apollonin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a great start! Do you want to merge these changes right away?

@apollonin apollonin self-requested a review January 6, 2023 22:00
dataset.update(description=description)
assert dataset.description == description

dataset.delete()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to add a check for the deleted dataset here by querying for the dataset

with pytest.raises(SomeException):
   client.get_dataset(dataset.uid)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already exists on line 44.

from copy import copy


def test_get_one_and_many_dataset_order(client):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work adding coverage for pagination!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt that part of the test_dataset was really testing pagination so I moved that here.

@whistler whistler changed the title Make dataset tests parallelizable [AL-4418] Make dataset tests parallelizable Jan 19, 2023
@whistler whistler changed the title [AL-4418] Make dataset tests parallelizable [AL-4418] [AL-3976] Make dataset tests parallelizable Jan 19, 2023
def test_timeout_error(client, project):
with pytest.raises(labelbox.exceptions.TimeoutError) as excinfo:
query_str = """query getOntology {
project (where: {id: $%s}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how did it even work ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it timed out before this got evaluated.

CAPTURE_DT_SCHEMA_ID = "cko8sdzv70006h2dk8jg64zvb"
PRE_COMPUTED_EMBEDDINGS_ID = 'ckrzang79000008l6hb5s6za1'
CUSTOM_TEXT_SCHEMA_NAME = 'custom_text'
CUSTOM_TEXT_SCHEMA_NAME = 'datarow_metadata_custom_text'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we want to use random schema name here for each test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change is not needed anymore so I'll revert it, before we were creating and deleting this for each test, but that doesn't work with parallel tests.

assert project.organization() == org
assert set(user.projects()) == user_projects.union({project})
assert set(org.projects()) == org_projects.union({project})
assert project in user_projects
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch! It has been intermittently failing recently on staging and with your change now should be fine!

@whistler whistler force-pushed the imuhammad/AL-3976-parallelizable-dataset-tests branch from 1f6c81d to 6177b59 Compare January 19, 2023 20:11
@whistler whistler merged commit 8cef3a5 into develop Jan 19, 2023
@whistler whistler deleted the imuhammad/AL-3976-parallelizable-dataset-tests branch January 19, 2023 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants