Skip to content

Commit

Permalink
[Enhancement] support show catalog recycle bin
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Satardekar <[email protected]>
  • Loading branch information
rohitrs1983 committed Sep 20, 2024
1 parent 6db6550 commit 2fa152c
Showing 1 changed file with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Collectors;

public class CatalogRecycleBinTest {

private static String rowsToString(List<List<String>> rows) {
List<String> lines = rows.stream().map(
row -> {
Expand Down Expand Up @@ -664,6 +663,14 @@ public void testShowCatalogRecycleBinDatabase(@Mocked GlobalStateMgr globalState
minTimes = 0;
}
};
String tz = "Asia/Shanghai";
new Expectations() {
{
globalStateMgr.getCurrentState().getVariableMgr().getDefaultSessionVariable().getTimeZone();
minTimes = 0;
result = tz;
}
};

recycleBin.eraseDatabase(now);

Expand Down Expand Up @@ -705,6 +712,14 @@ public void testShowCatalogRecycleBinTable(@Mocked GlobalStateMgr globalStateMgr
result = null;
}
};
String tz = "Asia/Shanghai";
new Expectations() {
{
globalStateMgr.getCurrentState().getVariableMgr().getDefaultSessionVariable().getTimeZone();
minTimes = 0;
result = tz;
}
};

// 1. add 2 tables
long dbId = 1;
Expand Down Expand Up @@ -765,6 +780,14 @@ public void testShowCatalogRecycleBinPartition(@Mocked GlobalStateMgr globalStat
minTimes = 0;
}
};
String tz = "Asia/Shanghai";
new Expectations() {
{
globalStateMgr.getCurrentState().getVariableMgr().getDefaultSessionVariable().getTimeZone();
minTimes = 0;
result = tz;
}
};

// 1. add 2 partitions
long dbId = 1;
Expand Down

0 comments on commit 2fa152c

Please sign in to comment.