Skip to content
Snippets Groups Projects
Commit 9758d3d7 authored by brinn's avatar brinn
Browse files

fix: make skip-accessibility-test-on-incoming really work, i.e. skip all...

fix: make skip-accessibility-test-on-incoming really work, i.e. skip all remote operations if this parameter is set 'true'

SVN: 18718
parent 0d7992a6
No related branches found
No related tags found
No related merge requests found
...@@ -47,15 +47,18 @@ public abstract class AbstractFileStore implements IFileStore ...@@ -47,15 +47,18 @@ public abstract class AbstractFileStore implements IFileStore
protected final IFileSysOperationsFactory factory; protected final IFileSysOperationsFactory factory;
protected final boolean skipAccessibilityTest;
protected AbstractFileStore( protected AbstractFileStore(
final HostAwareFileWithHighwaterMark hostAwareFileWithHighwaterMark, final String kind, final HostAwareFileWithHighwaterMark hostAwareFileWithHighwaterMark, final String kind,
final IFileSysOperationsFactory factory) final IFileSysOperationsFactory factory, final boolean skipAccessibilityTest)
{ {
assert hostAwareFileWithHighwaterMark != null; assert hostAwareFileWithHighwaterMark != null;
assert kind != null; assert kind != null;
this.hostAwareFileWithHighwaterMark = hostAwareFileWithHighwaterMark; this.hostAwareFileWithHighwaterMark = hostAwareFileWithHighwaterMark;
this.kind = kind; this.kind = kind;
this.factory = factory; this.factory = factory;
this.skipAccessibilityTest = skipAccessibilityTest;
} }
private final String getCanonicalPath(final File file) private final String getCanonicalPath(final File file)
...@@ -134,18 +137,22 @@ public abstract class AbstractFileStore implements IFileStore ...@@ -134,18 +137,22 @@ public abstract class AbstractFileStore implements IFileStore
public void check() throws ConfigurationFailureException public void check() throws ConfigurationFailureException
{ {
if (skipAccessibilityTest)
{
return;
}
if (srcHostOrNull != null) if (srcHostOrNull != null)
{ {
String executable = factory.tryGetIncomingRsyncExecutable(); final String executableOrNull = factory.tryGetIncomingRsyncExecutable();
FileUtilities.checkPathCopier(copier, srcHostOrNull, executable, FileUtilities.checkPathCopier(copier, srcHostOrNull, executableOrNull,
tryGetRsyncModuleName(), tryGetRsyncModuleName(),
DatamoverConstants.RSYNC_PASSWORD_FILE_INCOMING, DatamoverConstants.RSYNC_PASSWORD_FILE_INCOMING,
DatamoverConstants.TIMEOUT_REMOTE_CONNECTION_MILLIS); DatamoverConstants.TIMEOUT_REMOTE_CONNECTION_MILLIS);
} }
if (destHostOrNull != null) if (destHostOrNull != null)
{ {
String executable = factory.tryGetOutgoingRsyncExecutable(); final String executableOrNull = factory.tryGetOutgoingRsyncExecutable();
FileUtilities.checkPathCopier(copier, destHostOrNull, executable, FileUtilities.checkPathCopier(copier, destHostOrNull, executableOrNull,
destinationStore.tryGetRsyncModuleName(), destinationStore.tryGetRsyncModuleName(),
DatamoverConstants.RSYNC_PASSWORD_FILE_OUTGOING, DatamoverConstants.RSYNC_PASSWORD_FILE_OUTGOING,
DatamoverConstants.TIMEOUT_REMOTE_CONNECTION_MILLIS); DatamoverConstants.TIMEOUT_REMOTE_CONNECTION_MILLIS);
......
...@@ -60,16 +60,13 @@ public class FileStoreLocal extends AbstractFileStore implements IExtendedFileSt ...@@ -60,16 +60,13 @@ public class FileStoreLocal extends AbstractFileStore implements IExtendedFileSt
private final HighwaterMarkWatcher highwaterMarkWatcher; private final HighwaterMarkWatcher highwaterMarkWatcher;
private final boolean skipAccessibilityTest;
private final LastModificationChecker lastModificationChecker; private final LastModificationChecker lastModificationChecker;
public FileStoreLocal(final HostAwareFileWithHighwaterMark hostAwareFileWithHighwaterMark, public FileStoreLocal(final HostAwareFileWithHighwaterMark hostAwareFileWithHighwaterMark,
final String description, final IFileSysOperationsFactory factory, final String description, final IFileSysOperationsFactory factory,
final boolean skipAccessibilityTest) final boolean skipAccessibilityTest)
{ {
super(hostAwareFileWithHighwaterMark, description, factory); super(hostAwareFileWithHighwaterMark, description, factory, skipAccessibilityTest);
this.skipAccessibilityTest = skipAccessibilityTest;
this.remover = factory.getRemover(); this.remover = factory.getRemover();
this.mover = factory.getMover(); this.mover = factory.getMover();
this.highwaterMarkWatcher = createHighwaterMarkWatcher(hostAwareFileWithHighwaterMark); this.highwaterMarkWatcher = createHighwaterMarkWatcher(hostAwareFileWithHighwaterMark);
......
...@@ -112,8 +112,6 @@ public class FileStoreRemote extends AbstractFileStore ...@@ -112,8 +112,6 @@ public class FileStoreRemote extends AbstractFileStore
private final HighwaterMarkWatcher highwaterMarkWatcher; private final HighwaterMarkWatcher highwaterMarkWatcher;
private final boolean skipAccessibilityTest;
private String remoteLastchangedExecutableOrNull; private String remoteLastchangedExecutableOrNull;
private String remoteFindExecutableOrNull; private String remoteFindExecutableOrNull;
...@@ -140,9 +138,8 @@ public class FileStoreRemote extends AbstractFileStore ...@@ -140,9 +138,8 @@ public class FileStoreRemote extends AbstractFileStore
final IFileSysOperationsFactory factory, final boolean skipAccessibilityTest, final IFileSysOperationsFactory factory, final boolean skipAccessibilityTest,
final String remoteFindExecutableOrNull, final String remoteLastchangedExecutableOrNull) final String remoteFindExecutableOrNull, final String remoteLastchangedExecutableOrNull)
{ {
super(hostAwareFileWithHighwaterMark, kind, factory); super(hostAwareFileWithHighwaterMark, kind, factory, skipAccessibilityTest);
assert hostAwareFileWithHighwaterMark.tryGetHost() != null : "Unspecified host"; assert hostAwareFileWithHighwaterMark.tryGetHost() != null : "Unspecified host";
this.skipAccessibilityTest = skipAccessibilityTest;
this.sshCommandExecutor = this.sshCommandExecutor =
new SshCommandExecutor(sshCommandBuilder, new SshCommandExecutor(sshCommandBuilder,
hostAwareFileWithHighwaterMark.tryGetHost()); hostAwareFileWithHighwaterMark.tryGetHost());
......
...@@ -57,7 +57,7 @@ public final class FileStoreRemoteMounted extends AbstractFileStore ...@@ -57,7 +57,7 @@ public final class FileStoreRemoteMounted extends AbstractFileStore
final String description, final IFileSysOperationsFactory factory, final String description, final IFileSysOperationsFactory factory,
final boolean skipAccessibilityTest, final long lastChangedTimeoutMillis) final boolean skipAccessibilityTest, final long lastChangedTimeoutMillis)
{ {
super(file, description, factory); super(file, description, factory, skipAccessibilityTest);
this.localImpl = new FileStoreLocal(file, description, factory, skipAccessibilityTest); this.localImpl = new FileStoreLocal(file, description, factory, skipAccessibilityTest);
this.localImplMonitored = this.localImplMonitored =
MonitoringProxy.create(IFileStore.class, localImpl).timing( MonitoringProxy.create(IFileStore.class, localImpl).timing(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment