Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/1225#discussion_r185456207
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestCTTAS.java ---
@@ -164,121 +166,113 @@ public void
testResolveTemporaryTableWithPartialSchema() throws Exception {
@Test
public void testPartitionByWithTemporaryTables() throws Exception {
String temporaryTableName = "temporary_table_with_partitions";
- mockRandomUUID(UUID.nameUUIDFromBytes(temporaryTableName.getBytes()));
+ cleanSessionDirectory();
test("create TEMPORARY table %s partition by (c1) as select * from (" +
"select 'A' as c1 from (values(1)) union all select 'B' as c1 from
(values(1))) t", temporaryTableName);
- checkPermission(temporaryTableName);
+ checkPermission();
}
- @Test(expected = UserRemoteException.class)
+ @Test
public void testCreationOutsideOfDefaultTemporaryWorkspace() throws
Exception {
- try {
- String temporaryTableName =
"temporary_table_outside_of_default_workspace";
- test("create TEMPORARY table %s.%s as select 'A' as c1 from
(values(1))", temp2_schema, temporaryTableName);
- } catch (UserRemoteException e) {
- assertThat(e.getMessage(), containsString(String.format(
- "VALIDATION ERROR: Temporary tables are not allowed to be
created / dropped " +
- "outside of default temporary workspace [%s].",
DFS_TMP_SCHEMA)));
- throw e;
- }
+ String temporaryTableName =
"temporary_table_outside_of_default_workspace";
+
+ thrown.expect(UserRemoteException.class);
--- End diff --
Done.
---