saihemanth-cloudera commented on code in PR #4480:
URL: https://github.com/apache/hive/pull/4480#discussion_r1265796464


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitionsFromPartSpec.java:
##########
@@ -265,18 +265,17 @@ public void 
testAddPartitionSpecUpperCaseDBAndTableNameInOnePart() throws Except
 
     String rootPath = tableLocation + "/addpartspectest/";
     PartitionSpecProxy partitionSpec = buildPartitionSpec(DB_NAME, tableName, 
rootPath, partitions);
-    client.add_partitions_pspec(partitionSpec);
+    try {
+      client.add_partitions_pspec(partitionSpec);
+      Assert.fail("MetaException should have been thrown.");
+    } catch (MetaException e) {
+      // Expected exception
+      System.out.println(e);
+    }
 
-    Partition part = client.getPartition(DB_NAME, tableName, "year=2013");
-    Assert.assertNotNull(part);
-    Assert.assertEquals(tableName, part.getTableName());
-    Assert.assertEquals(DB_NAME, part.getDbName());
-    Assert.assertEquals(tableLocation + "/year=2013", 
part.getSd().getLocation());
-    part = client.getPartition(DB_NAME, tableName, "year=2014");
-    Assert.assertNotNull(part);
-    Assert.assertEquals(tableName, part.getTableName());
-    Assert.assertEquals(DB_NAME, part.getDbName());
-    Assert.assertEquals(tableLocation + "/year=2014", 
part.getSd().getLocation());
+    List<String> partitionNames = client.listPartitionNames(DB_NAME, 
tableName, MAX);

Review Comment:
   I think we should still keep the above lines L270-279. I think it makes 
sense to assert both of results of getPartitions() and listPartitions() apis



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to