Commit 3def7682 by Ashutosh Mestry

ATLAS-3150: Fixes for breaking unit tests. Fixed reference from JUnit to TestNG.

parent 24c9556c
...@@ -43,7 +43,7 @@ public class ComplexAttributesTest extends MigrationBaseAsserts { ...@@ -43,7 +43,7 @@ public class ComplexAttributesTest extends MigrationBaseAsserts {
String ENTITY_TYPE = "entity_type"; String ENTITY_TYPE = "entity_type";
String ENTITY_WITH_COMPLEX_COLL_TYPE = "entity_with_complex_collection_attr"; String ENTITY_WITH_COMPLEX_COLL_TYPE = "entity_with_complex_collection_attr";
final int EXPECTED_TOTAL_COUNT = 218; final int EXPECTED_TOTAL_COUNT = 217;
final int EXPECTED_ENTITY_TYPE_COUNT = 16; final int EXPECTED_ENTITY_TYPE_COUNT = 16;
final int EXPECTED_STRUCT_TYPE_COUNT = 3; final int EXPECTED_STRUCT_TYPE_COUNT = 3;
final int EXPECTED_ENTITY_WITH_COMPLEX_COLL_TYPE_COUNT = 1; final int EXPECTED_ENTITY_WITH_COMPLEX_COLL_TYPE_COUNT = 1;
......
...@@ -40,7 +40,7 @@ public class HiveParititionTest extends MigrationBaseAsserts { ...@@ -40,7 +40,7 @@ public class HiveParititionTest extends MigrationBaseAsserts {
@Test @Test
public void fileImporterTest() throws IOException, AtlasBaseException { public void fileImporterTest() throws IOException, AtlasBaseException {
final int EXPECTED_TOTAL_COUNT = 145; final int EXPECTED_TOTAL_COUNT = 144;
final int EXPECTED_DB_COUNT = 1; final int EXPECTED_DB_COUNT = 1;
final int EXPECTED_TABLE_COUNT = 2; final int EXPECTED_TABLE_COUNT = 2;
final int EXPECTED_COLUMN_COUNT = 7; final int EXPECTED_COLUMN_COUNT = 7;
......
...@@ -38,7 +38,7 @@ public class HiveStocksTest extends MigrationBaseAsserts { ...@@ -38,7 +38,7 @@ public class HiveStocksTest extends MigrationBaseAsserts {
@Test @Test
public void migrateStocks() throws AtlasBaseException, IOException { public void migrateStocks() throws AtlasBaseException, IOException {
final int EXPECTED_TOTAL_COUNT = 192; final int EXPECTED_TOTAL_COUNT = 191;
final int EXPECTED_DB_COUNT = 1; final int EXPECTED_DB_COUNT = 1;
final int EXPECTED_TABLE_COUNT = 1; final int EXPECTED_TABLE_COUNT = 1;
final int EXPECTED_COLUMN_COUNT = 7; final int EXPECTED_COLUMN_COUNT = 7;
......
...@@ -46,7 +46,7 @@ public class PathTest extends MigrationBaseAsserts { ...@@ -46,7 +46,7 @@ public class PathTest extends MigrationBaseAsserts {
@Test @Test
public void migrationImport() throws IOException, AtlasBaseException { public void migrationImport() throws IOException, AtlasBaseException {
final int EXPECTED_TOTAL_COUNT = 93; final int EXPECTED_TOTAL_COUNT = 92;
runFileImporter("path_db"); runFileImporter("path_db");
......
...@@ -39,7 +39,7 @@ public class TypesWithClassificationTest extends MigrationBaseAsserts { ...@@ -39,7 +39,7 @@ public class TypesWithClassificationTest extends MigrationBaseAsserts {
@Test @Test
public void verify() throws IOException, AtlasBaseException { public void verify() throws IOException, AtlasBaseException {
int EXPECTED_TOTAL_COUNT = 63; int EXPECTED_TOTAL_COUNT = 62;
String ENTITY_TYPE = "ComplexTraitType"; String ENTITY_TYPE = "ComplexTraitType";
String LEGACY_TYPE_TRAIT = "legacy_traitprayivofx4"; String LEGACY_TYPE_TRAIT = "legacy_traitprayivofx4";
String LEGACY_TYPE_VENDOR_PII = "legacy_VENDOR_PII"; String LEGACY_TYPE_VENDOR_PII = "legacy_VENDOR_PII";
......
...@@ -53,8 +53,8 @@ import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_WITH_SIMPLE_ATTR; ...@@ -53,8 +53,8 @@ import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_WITH_SIMPLE_ATTR;
import static org.apache.atlas.TestUtilsV2.NAME; import static org.apache.atlas.TestUtilsV2.NAME;
import static org.apache.atlas.repository.graph.GraphHelper.getStatus; import static org.apache.atlas.repository.graph.GraphHelper.getStatus;
import static org.apache.atlas.type.AtlasTypeUtil.getAtlasObjectId; import static org.apache.atlas.type.AtlasTypeUtil.getAtlasObjectId;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull; import static org.testng.Assert.assertNull;
import static org.testng.AssertJUnit.assertEquals;
@Guice(modules = TestModules.TestOnlyModule.class) @Guice(modules = TestModules.TestOnlyModule.class)
public class AtlasComplexAttributesTest extends AtlasEntityTestBase { public class AtlasComplexAttributesTest extends AtlasEntityTestBase {
...@@ -218,7 +218,7 @@ public class AtlasComplexAttributesTest extends AtlasEntityTestBase { ...@@ -218,7 +218,7 @@ public class AtlasComplexAttributesTest extends AtlasEntityTestBase {
assertNull(updatedSimpleEntity.getAttribute("stringAtrr")); assertNull(updatedSimpleEntity.getAttribute("stringAtrr"));
assertEquals(updatedSimpleEntity.getAttribute("mapOfStrings"), Collections.emptyMap()); assertEquals(updatedSimpleEntity.getAttribute("mapOfStrings"), Collections.emptyMap());
assertEquals(updatedSimpleEntity.getAttribute("arrayOfStrings"), Collections.emptyList()); assertNull(updatedSimpleEntity.getAttribute("arrayOfStrings"));
updatedSimpleEntity.setAttribute("stringAtrr", ""); updatedSimpleEntity.setAttribute("stringAtrr", "");
updatedSimpleEntity.setAttribute("mapOfStrings", null); updatedSimpleEntity.setAttribute("mapOfStrings", null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment