Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BasicLocationTests#testCreateLocation04() fails silently #460

Closed
HeikoKlare opened this issue Dec 22, 2023 · 2 comments · Fixed by #646
Closed

BasicLocationTests#testCreateLocation04() fails silently #460

HeikoKlare opened this issue Dec 22, 2023 · 2 comments · Fixed by #646

Comments

@HeikoKlare
Copy link
Contributor

The test case org.eclipse.osgi.tests.services.datalocation.BasicLocationTests#testCreateLocation04() fails silently. The test runs into a fail statement, which is caught and ignored by a surrounding try-catch:

try {
testLocation.set(testLocationFile.toURL(), true);
testLocation.release();
fail("Should not be able to lock read-only location");
} catch (Throwable t) {
// expected
}

I tried to replace this block with an assertThrows in #455, which fails because nothing is actually thrown.

I have not yet investigated whether the test or the tested functionality is faulty.

Copy link

This issue has been inactive for 180 days and is therefore labeled as stale.
If this issue became irrelevant in the meantime please close it as completed. If it is still relevant and you think it should be fixed some possibilities are listed below.
Please read https://github.com/eclipse-equinox/.github/blob/main/CONTRIBUTING.md#contributing-to-eclipse-equinox for ways to influence development.

@tjwatson
Copy link
Contributor

Apologize for the slow response, I must have missed this issue being open over the Holidays. The test is indeed bogus and if properly written it would have caught a regression introduced by eclipse-equinox/equinox.framework#39

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 a pull request may close this issue.

2 participants