Skip to content

Clean up test server after running unit tests #261

Closed

Description

@mfeurer

If a unit test is successful, delete everything it saved on the server. Otherwise, it's hard to have a clean server that is useful for testing purposes. One way to achieve this: add a 'sentinel' string, i.e. a unique random string, to everything that is uploaded. At unit test shutdown time, search for everything with that string and remove it from the server via an API call.

Activity

  1. added
    Good First IssueIssues suitable for people new to contributing to openml-python!
    on Oct 16, 2017
  2. self-assigned this
    on Jun 27, 2019
  3. Neeratyoy commented on Jun 27, 2019

    @Neeratyoy
    Contributor

    On a successful publish, a new entity_type/entity_id is generated. On using openml.utils._delete_entity(entity_type, entity_id), the entity_type/entity_id is no longer available on the test server.
    On re-publishing the same entity again, a new ID is generated, which is the previous ID+1. Is that an acceptable cleanup? Or is the expectation to not increase the file counter, i.e., on deletion, that ID's space will be re-used by subsequent uploads.

  4. mfeurer commented on Jul 8, 2019

    @mfeurer
    CollaboratorAuthor

    Is that an acceptable cleanup?

    Yes.

  5. mfeurer commented on Jul 19, 2019

    @mfeurer
    CollaboratorAuthor

    Added by #735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Feature requestGood First IssueIssues suitable for people new to contributing to openml-python!

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions