Page MenuHomePhabricator

Skip unit tests if `ArcanistLinter::getCacheVersion` throws an `ArcanistUsageException`
ClosedPublic

Authored by joshuaspence on Jan 9 2014, 1:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 19, 12:50 AM
Unknown Object (File)
Thu, Aug 29, 1:00 PM
Unknown Object (File)
Thu, Aug 29, 3:23 AM
Unknown Object (File)
Mon, Aug 26, 10:46 PM
Unknown Object (File)
Aug 19 2024, 1:46 PM
Unknown Object (File)
Aug 18 2024, 7:19 PM
Unknown Object (File)
Aug 18 2024, 5:00 AM
Unknown Object (File)
Aug 14 2024, 1:08 PM

Diff Detail

Branch
external_linter
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

Can you throw a comment in the catch block about why/when this happens?

Also, walk me through how this causes the tests to be skipped? That doesn't seem to follow obviously from this change...

Yeah sorry, that was a really bad attempt. Pushing a new diff

joshuaspence updated this revision to Unknown Object (????).Jan 9 2014, 2:18 AM

Previous attempt didn't work as expected.

src/lint/linter/__tests__/ArcanistLinterTestCase.php
122

ArcanistLinter::getCacheVersion throws ArcanistUsageException... it doesn't get converted into a PhutilAggregateException.

Ah, nice, this is much cleaner.