sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-2487: Sqoop2: ConnectorTestCase have wrong order of arguments in assertEquals
Date Mon, 17 Aug 2015 20:56:28 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 9ecd944dc -> 58b2d1c1c


SQOOP-2487: Sqoop2: ConnectorTestCase have wrong order of arguments in assertEquals

(Jarek Jarcec Cecho via Abraham Elmahrek)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/58b2d1c1
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/58b2d1c1
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/58b2d1c1

Branch: refs/heads/sqoop2
Commit: 58b2d1c1c43874014b68a03b46c1ef51aa0dd3d7
Parents: 9ecd944
Author: Abraham Elmahrek <abe@apache.org>
Authored: Mon Aug 17 13:54:54 2015 -0700
Committer: Abraham Elmahrek <abe@apache.org>
Committed: Mon Aug 17 13:54:54 2015 -0700

----------------------------------------------------------------------
 .../sqoop/test/testcases/ConnectorTestCase.java       | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/58b2d1c1/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java b/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
index 0bf62d5..622c3af 100644
--- a/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
+++ b/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
@@ -20,8 +20,6 @@ package org.apache.sqoop.test.testcases;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotSame;
 
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.mapred.JobConf;
 import org.apache.log4j.Logger;
 import org.apache.sqoop.client.SubmissionCallback;
 import org.apache.sqoop.common.test.asserts.ProviderAsserts;
@@ -38,8 +36,6 @@ import org.apache.sqoop.submission.SubmissionStatus;
 import org.apache.sqoop.test.data.Cities;
 import org.apache.sqoop.test.data.ShortStories;
 import org.apache.sqoop.test.data.UbuntuReleases;
-import org.apache.sqoop.test.hadoop.HadoopMiniClusterRunner;
-import org.apache.sqoop.test.hadoop.HadoopRunnerFactory;
 import org.apache.sqoop.validation.Status;
 import org.testng.annotations.AfterSuite;
 import org.testng.annotations.BeforeSuite;
@@ -257,8 +253,8 @@ abstract public class ConnectorTestCase extends TomcatTestCase {
    * @param link
    */
   protected void saveLink(MLink link) {
-    assertEquals(Status.OK, getClient().saveLink(link));
-    assertNotSame(MPersistableEntity.PERSISTANCE_ID_DEFAULT, link.getPersistenceId());
+    assertEquals(getClient().saveLink(link), Status.OK);
+    assertNotSame(link.getPersistenceId(), MPersistableEntity.PERSISTANCE_ID_DEFAULT);
   }
 
  /**
@@ -269,8 +265,8 @@ abstract public class ConnectorTestCase extends TomcatTestCase {
    * @param job
    */
  protected void saveJob(MJob job) {
-    assertEquals(Status.OK, getClient().saveJob(job));
-    assertNotSame(MPersistableEntity.PERSISTANCE_ID_DEFAULT, job.getPersistenceId());
+    assertEquals(getClient().saveJob(job), Status.OK);
+   assertNotSame(job.getPersistenceId(), MPersistableEntity.PERSISTANCE_ID_DEFAULT);
   }
 
   /**
@@ -286,7 +282,7 @@ abstract public class ConnectorTestCase extends TomcatTestCase {
       LOG.error("Submission has failed: " + finalSubmission.getError().getErrorSummary());
       LOG.error("Corresponding error details: " + finalSubmission.getError().getErrorDetails());
     }
-    assertEquals(SubmissionStatus.SUCCEEDED, finalSubmission.getStatus(),
+    assertEquals(finalSubmission.getStatus(), SubmissionStatus.SUCCEEDED,
             "Submission finished with error: " + finalSubmission.getError().getErrorSummary());
   }
 


Mime
View raw message