Github user steveloughran commented on the pull request: https://github.com/apache/spark/pull/12004#issuecomment-217536672 For anyone trying to run these tests, they'll need a test xml file and refer to it ``` mvn test -Phadoop-2.6 -Dcloud.test.configuration.file=../cloud.xml ``` The referenced file uses XInclude to input the AWS credentials which I keep a long way away from SCM-managed directories. ```xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- ~ 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. --> <configuration> <include xmlns="http://www.w3.org/2001/XInclude" href="file:///home/stevel/.aws/keys.xml"/> <property> <name>aws.tests.enabled</name> <value>true</value> </property> <property> <name>s3a.test.uri</name> <value>s3a://test-eu1</value> </property> </configuration> ``` All the test suites will be designed to run iff the relevant enabled.flag is set; this is why there's a new method to declare tests, `ctest(key: String, summary: String, detail: String)(testFun: => Unit): Unit` these tests are not only conditional on the suite being enabled, they each have a key which can be explicitly named from the build in the `test.method.keys` attr. This allows explicit methods to be named the way the current maven surefire runner doesn't; the time it can take to run individual tests makes this feature invaluable during iterative development. ```scala ctest("CSVgz", "Read compressed CSV", "Read compressed CSV files through the spark context") { val source = SceneList sc = new SparkContext("local", "test", newSparkConf(source)) val sceneInfo = getFS(source).getFileStatus(source) logInfo(s"Compressed size = ${sceneInfo.getLen}") validateCSV(sc, source) logInfo(s"Filesystem statistics ${getFS(source)}") } ``` For best performance, you need a build of hadoop which has as much of [HADOOP-11694](https://issues.apache.org/jira/browse/HADOOP-11694) applied, especially HADOOP-12444, lazy seek (in branch-2.8 already), and [HADOOP-13028](https://issues.apache.org/jira/browse/HADOOP-13028) ``` mvn test -Phadoop-2.7 -DwildcardSuites=org.apache.spark.cloud.s3.S3aIOSuite \ -Dcloud.test.configuration.file=../cloud.xml \ -Dhadoop.version=2.9.0-SNAPSHOT \ -Dtest.method.keys=CSVgz ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org