[fix](pipeline)add logs for unstable cases #24073
Issue Number: close #xxx ShowTableStmtTest.testNoDb and DropDbStmtTest.testNoPriv are unstable cases,error msg is: java.lang.Exception: Unexpected exception, expected<org.apache.doris.common.AnalysisException> but was<mockit.internal.expectations.invocation.MissingInvocation> we can not know what is missing ,and this issue cannot be reproduced locally,so add some log
This commit is contained in:
@ -60,11 +60,17 @@ public class DropDbStmtTest {
|
||||
Assert.fail("no exception");
|
||||
}
|
||||
|
||||
@Test(expected = AnalysisException.class)
|
||||
public void testNoPriv() throws UserException, AnalysisException {
|
||||
@Test
|
||||
public void testNoPriv() {
|
||||
DropDbStmt stmt = new DropDbStmt(false, "", true);
|
||||
|
||||
stmt.analyze(AccessTestUtil.fetchBlockAnalyzer());
|
||||
try {
|
||||
stmt.analyze(AccessTestUtil.fetchBlockAnalyzer());
|
||||
} catch (AnalysisException e) {
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Assert.fail(e.getMessage());
|
||||
}
|
||||
Assert.fail("no exception");
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,10 +68,17 @@ public class ShowTableStmtTest {
|
||||
Assert.assertEquals("Table_type", stmt.getMetaData().getColumn(1).getName());
|
||||
}
|
||||
|
||||
@Test(expected = AnalysisException.class)
|
||||
public void testNoDb() throws AnalysisException {
|
||||
@Test
|
||||
public void testNoDb() {
|
||||
ShowTableStmt stmt = new ShowTableStmt("", null, false, null);
|
||||
stmt.analyze(AccessTestUtil.fetchEmptyDbAnalyzer());
|
||||
try {
|
||||
stmt.analyze(AccessTestUtil.fetchEmptyDbAnalyzer());
|
||||
} catch (AnalysisException e) {
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Assert.fail(e.getMessage());
|
||||
}
|
||||
Assert.fail("No exception throws");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user