-
Notifications
You must be signed in to change notification settings - Fork 194
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
Follow P2 contract of cached file's extension (#2938) #2945
Conversation
P2 relies on correct file extensions to parse cached files. Fixes eclipse-tycho#2938 See P2 bug: eclipse-equinox/p2#355 Integration test infrastructure touch-ups: Fix HttpServer concurrency bug. URLs returned from HttpServer.getAccessedUrls() are now stripped of context prefix. No callers have used these values until now. Fix concurrency bug in test utility class HttpServer request logging.
} | ||
|
||
public String getUrl(String contextName) { | ||
return "http://localhost:" + port + "/" + contextName; | ||
} | ||
|
||
public List<String> getAccessedUrls(String contextName) { | ||
return contextName2servletsMap.get(contextName).getAccessedURIs(); | ||
synchronized (contextName2accessedUrls) { | ||
return List.copyOf(contextName2accessedUrls.get(contextName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seem to introduce test failures now as some test afterwards modify the collection see:
https://ci.eclipse.org/tycho/job/tycho-github/job/PR-2945/1/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OfflineModeTest fails with UnsupportedOperationException as HttpServer no longer allows direct access to access logs. Change OfflineModeTest to dedicated and limited mutation API for access logs.
Improve variable locality. Make error log assertion first, to facilitate investigation of non-network failures.
org.eclipse.tycho.test.surefire.RunOrderTest.testRunOrder is unstable, I've failed to reproduce the failure locally. |
MultiMap.get() may return null.
Test failures seem to be caused by eclipse infrastructure errors... |
I'm not sure about that. Are those test supposed to access internet at all? |
Yes the integrationtests access e.g. maven or eclipse updatesites. Lets see if restarting the build makes them pass. |
Aggregator integration failure is unclear to me, but it also happens on other unrelated PRs. The PR is ready for review.
|
Fixes #2938
CacheManager
injected from Tycho into P2 names cached downloads internally based on their URLsThis change ensures that CacheManager injected into P2 adheres to the contract and returns cached files with extensions matching the (original, before redirect) request.
Integration test infrastructure touch-ups:
URLs returned from HttpServer.getAccessedUrls() are now stripped of context prefix. No callers have used these values until now. Fix concurrency bug in test utility class HttpServer request logging.