lgoldstein commented on a change in pull request #123:
URL: https://github.com/apache/mina-sshd/pull/123#discussion_r412176062



##########
File path: 
sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpTransferTest.java
##########
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sshd.client.subsystem.sftp;
+
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.sshd.client.session.ClientSession;
+import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystem;
+import org.junit.Test;
+
+public class SftpTransferTest extends AbstractSftpClientTestSupport {

Review comment:
       >> I'll add it, but not sure when it's actually useful...
   
   My experience shows that it is possible for a unit test to fail due to some 
unforeseen dependency with some side-effect of some other test. However, if the 
order of the tests changes from one run to another (can happen if using a 
different JDK version) then the failure may become irreproducible. Therefore, 
the _surefire_ plugin is configured to run the classes in alphabetical order - 
but within each class we want to make sure the individual tests are also run in 
a predictable order. This way, if a unit test fails (for whatever reason - not 
only because of interaction with another test) we can re-produce it with a high 
probability.
   
   Of course, the down side is that if there is some interaction we don't know 
about we might not discover it until by some chance the lexicographical order 
changes. This can be managed by having a **separate** build profile that 
randomizes the methods, lists the chosen permutation and then runs the tests in 
that particular order. This way, if there is some unknown interaction between 
the tests we might detect it eventually and then reproduce it using the listed 
permutation order.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to