5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-09 01:31:58 +08:00

SQOOP-2761: Sqoop2: Provide test infrastructure base class for tool tests

(Dian Fu via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2015-12-31 06:14:55 -08:00
parent 008b126932
commit fc1b1f950c
2 changed files with 14 additions and 4 deletions

View File

@ -630,4 +630,12 @@ protected void validateContent(String[] content, String topic) throws Unsupporte
Assert.assertEquals(inputSet, outputSet);
}
protected String getTemporaryPath() {
return HdfsUtils.joinPathFragments(ROOT_PATH, suiteName);
}
protected String getSqoopMiniClusterTemporaryPath() {
return getInfrastructureProvider(SqoopInfrastructureProvider.class).getRootPath();
}
}

View File

@ -19,7 +19,6 @@
import org.apache.commons.io.Charsets;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;
import org.apache.sqoop.common.VersionInfo;
import org.apache.sqoop.json.JSONUtils;
import org.apache.sqoop.json.JobsBean;
@ -27,7 +26,10 @@
import org.apache.sqoop.json.SubmissionsBean;
import org.apache.sqoop.model.*;
import org.apache.sqoop.submission.SubmissionStatus;
import org.apache.sqoop.test.testcases.ConnectorTestCase;
import org.apache.sqoop.test.infrastructure.Infrastructure;
import org.apache.sqoop.test.infrastructure.SqoopTestCase;
import org.apache.sqoop.test.infrastructure.providers.KdcInfrastructureProvider;
import org.apache.sqoop.test.infrastructure.providers.SqoopInfrastructureProvider;
import org.apache.sqoop.test.utils.HdfsUtils;
import org.apache.sqoop.tools.tool.JSONConstants;
import org.apache.sqoop.tools.tool.RepositoryDumpTool;
@ -43,9 +45,9 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
public class RepositoryDumpLoadToolTest extends ConnectorTestCase {
@Infrastructure(dependencies = {KdcInfrastructureProvider.class, SqoopInfrastructureProvider.class})
public class RepositoryDumpLoadToolTest extends SqoopTestCase {
private static final Logger LOG = Logger.getLogger(RepositoryDumpLoadToolTest.class);
private String jsonFilePath;
// do the load test and insert data to repo first, then do the dump test.