Skip to content

BUG: Fix tests failing due to orphaned User object #2336

Open
@MackHalliday

Description

@MackHalliday

Description

While working on fixing failing tests for ticket #1682, it was discovered that 6 tests fail due to an orphaned User object being created somewhere within the test suite. These tests have been skipped with the comment `TODO #2336 - Fail due to orphaned User object'. These tests only fail when ran by the Github Job and do not fail locally.

Screenshot of failing tests and error
Image

  • Search sqlalchemy.orm.exc.DetachedInstanceError: Instance in Oddball slack to see how to possibility debug. See this thread for clue.

  • Ticket is understood, and QA has been contacted (if the ticket has a QA label).

  • This work is added to the sprint review slide deck (key win bullet point and demo slide)

Steps to Reproduce

  1. Unskip tests with the comment TODO - #2336
  2. Push unskipped test to Github
  3. View Github Job test/test fail

Impact/Urgency

  • Low - Only unit tests are impacted.

Expected Behavior

  • The 6 skipped unit tests should run without issue.
  • There should be no orphaned User objects after the test suite runs in Github Jobs test/test.

QA Considerations

Additional Info & Resources

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions