HomePhabricator

Provide isolated, read/write storage fixtures for unit tests
Audited5ab14d08793fUnpublished

Unpublished Commit · Learn More

No further details are available.

Description

Provide isolated, read/write storage fixtures for unit tests

Summary:

  • Unit tests can request storage fixtures.
  • We build one fixture across all tests in the process, which can quickstart (takes roughly 1s to build, 200ms to destroy for me). This is a one-time cost for running an arbitrary number of fixture-based tests.
  • We isolate all the connections inside transactions for each test, so individual tests don't affect one another.

Test Plan: Ran unit tests, which cover the important properties of fixtures.

Reviewers: btrahan, vrana, jungejason, edward

Reviewed By: btrahan

CC: aran, davidreuss

Maniphest Tasks: T140

Differential Revision: https://secure.phabricator.com/D2345

Details

Auditors
vrana
Provenance
epriestleyAuthored on
Reviewer
btrahan
Differential Revision
Restricted Differential Revision
Parents
rP56529f88e015: Show verb of closed diff based on backing vcs, not local vcs
Branches
Unknown
Tags
Unknown

Event Timeline

vrana raised a concern with this commit.Oct 24 2012, 8:38 PM
vrana added inline comments.
/src/infrastructure/testing/fixture/storage/PhabricatorStorageFixtureScopeGuard.php
48

This doesn't work under Windows.

vrana added inline comments.
/src/infrastructure/testing/fixture/storage/PhabricatorStorageFixtureScopeGuard.php
48

D3813