mirror of
https://github.com/apache/sqoop.git
synced 2025-05-09 05:01:06 +08:00
SQOOP-2761: Sqoop2: Provide test infrastructure base class for tool tests
(Dian Fu via Jarek Jarcec Cecho)
This commit is contained in:
parent
008b126932
commit
fc1b1f950c
@ -630,4 +630,12 @@ protected void validateContent(String[] content, String topic) throws Unsupporte
|
|||||||
|
|
||||||
Assert.assertEquals(inputSet, outputSet);
|
Assert.assertEquals(inputSet, outputSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String getTemporaryPath() {
|
||||||
|
return HdfsUtils.joinPathFragments(ROOT_PATH, suiteName);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getSqoopMiniClusterTemporaryPath() {
|
||||||
|
return getInfrastructureProvider(SqoopInfrastructureProvider.class).getRootPath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
import org.apache.commons.io.Charsets;
|
import org.apache.commons.io.Charsets;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import org.apache.sqoop.common.VersionInfo;
|
import org.apache.sqoop.common.VersionInfo;
|
||||||
import org.apache.sqoop.json.JSONUtils;
|
import org.apache.sqoop.json.JSONUtils;
|
||||||
import org.apache.sqoop.json.JobsBean;
|
import org.apache.sqoop.json.JobsBean;
|
||||||
@ -27,7 +26,10 @@
|
|||||||
import org.apache.sqoop.json.SubmissionsBean;
|
import org.apache.sqoop.json.SubmissionsBean;
|
||||||
import org.apache.sqoop.model.*;
|
import org.apache.sqoop.model.*;
|
||||||
import org.apache.sqoop.submission.SubmissionStatus;
|
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.test.utils.HdfsUtils;
|
||||||
import org.apache.sqoop.tools.tool.JSONConstants;
|
import org.apache.sqoop.tools.tool.JSONConstants;
|
||||||
import org.apache.sqoop.tools.tool.RepositoryDumpTool;
|
import org.apache.sqoop.tools.tool.RepositoryDumpTool;
|
||||||
@ -43,9 +45,9 @@
|
|||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
import static org.testng.Assert.assertTrue;
|
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;
|
private String jsonFilePath;
|
||||||
|
|
||||||
// do the load test and insert data to repo first, then do the dump test.
|
// do the load test and insert data to repo first, then do the dump test.
|
||||||
|
Loading…
Reference in New Issue
Block a user