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)
Mon, Nov 25, 1:40 AM
Unknown Object (File)
Thu, Nov 21, 4:00 PM
Unknown Object (File)
Sun, Nov 17, 1:31 PM
Unknown Object (File)
Wed, Nov 13, 3:29 AM
Unknown Object (File)
Sun, Nov 10, 8:17 AM
Unknown Object (File)
Oct 24 2024, 2:07 PM
Unknown Object (File)
Oct 19 2024, 7:45 AM
Unknown Object (File)
Oct 17 2024, 8:25 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.