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)
Fri, Feb 28, 5:19 PM
Unknown Object (File)
Jan 28 2025, 5:58 PM
Unknown Object (File)
Jan 27 2025, 2:46 AM
Unknown Object (File)
Jan 17 2025, 12:50 AM
Unknown Object (File)
Dec 26 2024, 3:08 AM
Unknown Object (File)
Dec 15 2024, 6:37 AM
Unknown Object (File)
Dec 7 2024, 5:09 PM
Unknown Object (File)
Dec 7 2024, 6:57 AM

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

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.