Skip to content

Commit

Permalink
[UT] remove time cost ut (#40636)
Browse files Browse the repository at this point in the history
The test had been moved to MockQueryDumpTest.

Signed-off-by: packy92 <[email protected]>
  • Loading branch information
packy92 authored Feb 2, 2024
1 parent d229a2b commit 24309c1
Showing 1 changed file with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.starrocks.sql.plan;

import com.google.common.collect.Lists;
import com.starrocks.common.FeConstants;
import com.starrocks.common.Pair;
import com.starrocks.qe.SessionVariable;
Expand All @@ -32,12 +31,6 @@
import org.junit.Assert;
import org.junit.Test;

import java.io.File;
import java.util.List;
import java.util.Objects;

import static org.junit.Assert.fail;

public class ReplayFromDumpTest extends ReplayFromDumpTestBase {

@Test
Expand Down Expand Up @@ -661,37 +654,6 @@ public void testReduceJoinTransformation3() throws Exception {
" |----24:EXCHANGE"));
}

@Test
public void testMockQueryDump() {
List<String> fileNames = mockCases();
for (String fileName : fileNames) {
try {
Pair<QueryDumpInfo, String> replayPair =
getPlanFragment(getDumpInfoFromFile("query_dump/mock-files/" + fileName),
null, TExplainLevel.NORMAL);
Assert.assertTrue(replayPair.second, replayPair.second.contains("mock"));
} catch (Throwable e) {
fail("file: " + fileName + " should success. errMsg: " + e.getMessage());
}

}
}

private static List<String> mockCases() {
String folderPath = Objects.requireNonNull(ClassLoader.getSystemClassLoader().getResource("sql")).getPath()
+ "/query_dump/mock-files";
File folder = new File(folderPath);
List<String> fileNames = Lists.newArrayList();

if (folder.exists() && folder.isDirectory()) {
File[] files = folder.listFiles();
for (File file : files) {
fileNames.add(file.getName().split("\\.")[0]);
}
}
return fileNames;
}

@Test
public void testUnionAllWithTopNRuntimeFilter() throws Exception {
QueryDumpInfo queryDumpInfo =
Expand Down

0 comments on commit 24309c1

Please sign in to comment.