sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject [5/9] SQOOP-1379: Sqoop2: From/To: Disable tests
Date Wed, 16 Jul 2014 04:15:20 GMT
http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/core/src/test/java/org/apache/sqoop/framework/TestFrameworkValidator.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/sqoop/framework/TestFrameworkValidator.java b/core/src/test/java/org/apache/sqoop/framework/TestFrameworkValidator.java
index 7e25d34..f875ceb 100644
--- a/core/src/test/java/org/apache/sqoop/framework/TestFrameworkValidator.java
+++ b/core/src/test/java/org/apache/sqoop/framework/TestFrameworkValidator.java
@@ -35,134 +35,134 @@ import static org.junit.Assert.assertTrue;
  */
 public class TestFrameworkValidator {
 
-  FrameworkValidator validator;
-
-  @Before
-  public void setUp() {
-    validator = new FrameworkValidator();
-  }
-
-  @Test
-  public void testConnectionValidation() {
-    ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration();
-
-    Validation validation = validator.validateConnection(connectionConfiguration);
-    assertEquals(Status.FINE, validation.getStatus());
-    assertEquals(0, validation.getMessages().size());
-  }
-
-  @Test
-  public void testExportJobValidation() {
-    ExportJobConfiguration configuration;
-    Validation validation;
-
-    // Empty form is not allowed
-    configuration = new ExportJobConfiguration();
-    validation = validator.validateJob(MJob.Type.EXPORT, configuration);
-    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("input.inputDirectory")));
-
-    // Explicitly setting extractors and loaders
-    configuration = new ExportJobConfiguration();
-    configuration.input.inputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 3;
-    configuration.throttling.loaders = 3;
-
-    validation = validator.validateJob(MJob.Type.EXPORT, configuration);
-    assertEquals(Status.FINE, validation.getStatus());
-    assertEquals(0, validation.getMessages().size());
-
-    // Negative and zero values for extractors and loaders
-    configuration = new ExportJobConfiguration();
-    configuration.input.inputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 0;
-    configuration.throttling.loaders = -1;
-
-    validation = validator.validateJob(MJob.Type.EXPORT, configuration);
-    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.extractors")));
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.loaders")));
-  }
-
-
-  @Test
-  public void testImportJobValidation() {
-    ImportJobConfiguration configuration;
-    Validation validation;
-
-    // Empty form is not allowed
-    configuration = new ImportJobConfiguration();
-    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
-    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.outputDirectory")));
-
-    // Explicitly setting extractors and loaders
-    configuration = new ImportJobConfiguration();
-    configuration.output.outputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 3;
-    configuration.throttling.loaders = 3;
-
-    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
-    assertEquals(Status.FINE, validation.getStatus());
-    assertEquals(0, validation.getMessages().size());
-
-    // Negative and zero values for extractors and loaders
-    configuration = new ImportJobConfiguration();
-    configuration.output.outputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 0;
-    configuration.throttling.loaders = -1;
-
-    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
-    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.extractors")));
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.loaders")));
-
-    // specifying both compression as well as customCompression is
-    // unacceptable
-    configuration = new ImportJobConfiguration();
-    configuration.output.outputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 2;
-    configuration.throttling.loaders = 2;
-    configuration.output.compression = OutputCompression.BZIP2;
-    configuration.output.customCompression = "some.compression.codec";
-
-    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
-    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.compression")));
-
-    // specifying a customCompression is fine
-    configuration = new ImportJobConfiguration();
-    configuration.output.outputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 2;
-    configuration.throttling.loaders = 2;
-    configuration.output.compression = OutputCompression.CUSTOM;
-    configuration.output.customCompression = "some.compression.codec";
-
-    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
-    assertEquals(Status.FINE, validation.getStatus());
-
-    // specifying a customCompression without codec name is unacceptable
-    configuration = new ImportJobConfiguration();
-    configuration.output.outputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 2;
-    configuration.throttling.loaders = 2;
-    configuration.output.compression = OutputCompression.CUSTOM;
-    configuration.output.customCompression = "";
-
-    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
-    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.compression")));
-
-    configuration = new ImportJobConfiguration();
-    configuration.output.outputDirectory = "/czech/republic";
-    configuration.throttling.extractors = 2;
-    configuration.throttling.loaders = 2;
-    configuration.output.compression = OutputCompression.CUSTOM;
-    configuration.output.customCompression = null;
-
-    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
-    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
-    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.compression")));
-
-  }
+//  FrameworkValidator validator;
+//
+//  @Before
+//  public void setUp() {
+//    validator = new FrameworkValidator();
+//  }
+//
+//  @Test
+//  public void testConnectionValidation() {
+//    ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration();
+//
+//    Validation validation = validator.validateConnection(connectionConfiguration);
+//    assertEquals(Status.FINE, validation.getStatus());
+//    assertEquals(0, validation.getMessages().size());
+//  }
+//
+//  @Test
+//  public void testExportJobValidation() {
+//    ExportJobConfiguration configuration;
+//    Validation validation;
+//
+//    // Empty form is not allowed
+//    configuration = new ExportJobConfiguration();
+//    validation = validator.validateJob(MJob.Type.EXPORT, configuration);
+//    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("input.inputDirectory")));
+//
+//    // Explicitly setting extractors and loaders
+//    configuration = new ExportJobConfiguration();
+//    configuration.input.inputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 3;
+//    configuration.throttling.loaders = 3;
+//
+//    validation = validator.validateJob(MJob.Type.EXPORT, configuration);
+//    assertEquals(Status.FINE, validation.getStatus());
+//    assertEquals(0, validation.getMessages().size());
+//
+//    // Negative and zero values for extractors and loaders
+//    configuration = new ExportJobConfiguration();
+//    configuration.input.inputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 0;
+//    configuration.throttling.loaders = -1;
+//
+//    validation = validator.validateJob(MJob.Type.EXPORT, configuration);
+//    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.extractors")));
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.loaders")));
+//  }
+//
+//
+//  @Test
+//  public void testImportJobValidation() {
+//    ImportJobConfiguration configuration;
+//    Validation validation;
+//
+//    // Empty form is not allowed
+//    configuration = new ImportJobConfiguration();
+//    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
+//    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.outputDirectory")));
+//
+//    // Explicitly setting extractors and loaders
+//    configuration = new ImportJobConfiguration();
+//    configuration.output.outputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 3;
+//    configuration.throttling.loaders = 3;
+//
+//    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
+//    assertEquals(Status.FINE, validation.getStatus());
+//    assertEquals(0, validation.getMessages().size());
+//
+//    // Negative and zero values for extractors and loaders
+//    configuration = new ImportJobConfiguration();
+//    configuration.output.outputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 0;
+//    configuration.throttling.loaders = -1;
+//
+//    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
+//    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.extractors")));
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("throttling.loaders")));
+//
+//    // specifying both compression as well as customCompression is
+//    // unacceptable
+//    configuration = new ImportJobConfiguration();
+//    configuration.output.outputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 2;
+//    configuration.throttling.loaders = 2;
+//    configuration.output.compression = OutputCompression.BZIP2;
+//    configuration.output.customCompression = "some.compression.codec";
+//
+//    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
+//    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.compression")));
+//
+//    // specifying a customCompression is fine
+//    configuration = new ImportJobConfiguration();
+//    configuration.output.outputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 2;
+//    configuration.throttling.loaders = 2;
+//    configuration.output.compression = OutputCompression.CUSTOM;
+//    configuration.output.customCompression = "some.compression.codec";
+//
+//    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
+//    assertEquals(Status.FINE, validation.getStatus());
+//
+//    // specifying a customCompression without codec name is unacceptable
+//    configuration = new ImportJobConfiguration();
+//    configuration.output.outputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 2;
+//    configuration.throttling.loaders = 2;
+//    configuration.output.compression = OutputCompression.CUSTOM;
+//    configuration.output.customCompression = "";
+//
+//    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
+//    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.compression")));
+//
+//    configuration = new ImportJobConfiguration();
+//    configuration.output.outputDirectory = "/czech/republic";
+//    configuration.throttling.extractors = 2;
+//    configuration.throttling.loaders = 2;
+//    configuration.output.compression = OutputCompression.CUSTOM;
+//    configuration.output.customCompression = null;
+//
+//    validation = validator.validateJob(MJob.Type.IMPORT, configuration);
+//    assertEquals(Status.UNACCEPTABLE, validation.getStatus());
+//    assertTrue(validation.getMessages().containsKey(new Validation.FormInput("output.compression")));
+//
+//  }
 }


Mime
View raw message