Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

Some tests still access the deprecated IResource#isReadyOnly() and IResource#setReadOnly(). Some do that by intent to test the deprecated functionality, some have not been adapted to (also) test the new way of accessing that property. This leads to potentially missed test paths and also produces useless warnings.
This change parameterizes the existing callers in tests to test both the legacy API as well as the recommended one..

Some tests still access the deprecated IResource#isReadyOnly() and
IResource#setReadOnly(). Some do that by intent to test the deprecated
functionality, some have not been adapted to (also) test the new way of
accessing that property. This leads to potentially missed test paths and
also produces useless warnings.
This change parameterizes the existing callers in tests to test both the
legacy API as well as the recommended one..
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Test Results

 1 899 files   -  54   1 899 suites   - 54   1h 31m 11s ⏱️ + 5m 34s
 4 748 tests +  4   4 057 ✅  - 663   24 💤 ± 0  339 ❌ +339  328 🔥 +328 
13 938 runs   - 294  13 129 ✅  - 921  141 💤  - 41  340 ❌ +340  328 🔥 +328 

For more details on these failures and errors, see this check.

Results for commit 89790cb. ± Comparison against base commit 341ca64.

This pull request removes 5 and adds 9 tests. Note that renamed tests count towards both.
AutomatedResourceTests AllRegressionTests IFileTest ‑ testBug25658
AutomatedResourceTests AllRegressionTests IFileTest ‑ testBug25662
AutomatedResourceTests AllRegressionTests IFolderTest ‑ testBug25662
AutomatedResourceTests AllResourcesTests IFolderTest ‑ testReadOnlyFolderCopy
AutomatedResourceTests AllResourcesTests IWorkspaceTest ‑ testValidateEdit
AutomatedResourceTests AllRegressionTests IFileTest ‑ testBug25658(ReadOnlyApi)
AutomatedResourceTests AllRegressionTests IFileTest ‑ testBug25662(ReadOnlyApi)[1] CURRENT
AutomatedResourceTests AllRegressionTests IFileTest ‑ testBug25662(ReadOnlyApi)[2] DEPRECATED
AutomatedResourceTests AllRegressionTests IFolderTest ‑ testBug25662(ReadOnlyApi)[1] CURRENT
AutomatedResourceTests AllRegressionTests IFolderTest ‑ testBug25662(ReadOnlyApi)[2] DEPRECATED
AutomatedResourceTests AllResourcesTests IFolderTest ‑ testReadOnlyFolderCopy(ReadOnlyApi)[1] CURRENT
AutomatedResourceTests AllResourcesTests IFolderTest ‑ testReadOnlyFolderCopy(ReadOnlyApi)[2] DEPRECATED
AutomatedResourceTests AllResourcesTests IWorkspaceTest ‑ testValidateEdit(ReadOnlyApi)[1] CURRENT
AutomatedResourceTests AllResourcesTests IWorkspaceTest ‑ testValidateEdit(ReadOnlyApi)[2] DEPRECATED
This pull request removes 1 skipped test and adds 1 skipped test. Note that renamed tests count towards both.
AutomatedResourceTests AllRegressionTests IFileTest ‑ testBug25658
AutomatedResourceTests AllRegressionTests IFileTest ‑ testBug25658(ReadOnlyApi)

assertThat(folder).matches(res -> isReadOnly(res, apiVersion), "is read only");
CoreException exception = assertThrows(CoreException.class,
() -> file.create(createRandomContentsStream(), true, createTestMonitor()));
assertEquals(IResourceStatus.PARENT_READ_ONLY, exception.getStatus().getCode());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test failure caused by this test extension indicates that the behavior on Linux expected by the test is not given when setting the read-only property for a folder via ResourceAttributes instead of using the deprecated setReadOnly() method:

AutomatedResourceTests AllRegressionTests IFileTest.testBug25662(ReadOnlyApi)[1] CURRENT
expected: <277> but was: <273>

The test is about expecting a failure with status IResourceStatus.PARENT_READ_ONLY when creating a file in a folder that was marked as read only. But this only seems to happen when the folder was marked as read only via IResource#setReadOnly() and not via IResource#setResourceAttributes().

@akurtakov do you think this is something that should be fixed for the Linux implementation or should I just revert the test extension here and keep it limited to the deprecated method IResource#setReadOnly() as it was before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant