Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

NXCM-4861: Fixing the ArtifactStoreHelper.storeItemWithChecksums method #706

Merged
merged 3 commits into from Jan 4, 2013

Conversation

cstamas
Copy link
Contributor

@cstamas cstamas commented Dec 18, 2012

In some cases, current imple can result in remote item download
for some proxy configuration, like itemAgingActive=false used by
procurement.

Fixing it, to enforce "localOnly" flag. Basically, same code
is now executed as in case of cache (where also store+retrieve)
happens, see:
org.sonatype.nexus.proxy.repository.AbstractProxyRepository#doCacheItem

Other minor cleanup (mostly javadoc) done.

Added UT that verifies that maven repo now receives a retrieve
with localOnly=true flag.

In some cases, current imple can result in remote item download
for some proxy configuration, like itemAgingActive=false used by
procurement.

Fixing it, to enforce "localOnly" flag. Basically, same code
is now executed as in case of cache (where also store+retrieve)
happens, see:
org.sonatype.nexus.proxy.repository.AbstractProxyRepository#doCacheItem

Other minor cleanup (mostly javadoc) done.

Added UT that verifies that maven repo now receives a retrieve
with localOnly=true flag.
@cstamas
Copy link
Contributor Author

cstamas commented Dec 18, 2012

import org.sonatype.nexus.proxy.storage.local.LocalRepositoryStorage;
import org.sonatype.sisu.litmus.testsupport.mock.MockitoRule;

public class Nxcm4861Test
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs more descriptive name, that tells what the test actually tests, something like Nxcm4861ArtifactStoreHelper_storeItemWithChecksumsTest

sb.append( "\")" );
return sb.toString();
return "ResourceStoreRequest{" +
"requestPath='" + requestPath + '\'' +
Copy link
Member

Choose a reason for hiding this comment

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

why add the artificial slash here? to request path

...and before it was a leading slash, now it is added at end.

cstamas added a commit that referenced this pull request Jan 4, 2013
NXCM-4861: Fixing the ArtifactStoreHelper.storeItemWithChecksums method
@cstamas cstamas merged commit 1b147dd into master Jan 4, 2013
@cstamas cstamas deleted the nxcm-4861 branch January 4, 2013 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants