This commit is contained in:
Zoltan Haindrich 2024-06-18 12:41:21 +00:00
parent e81591499c
commit 75c578ae33
4 changed files with 11 additions and 9 deletions

View File

@ -1,2 +0,0 @@
#started
!connect druidtest:///

View File

@ -44,6 +44,7 @@ public class QuidemRecorder implements AutoCloseable, DruidHook<String>
} }
printStream.println("#started " + new Date()); printStream.println("#started " + new Date());
printStream.println("!use " + quidemURI.toString()); printStream.println("!use " + quidemURI.toString());
printStream.println("!set outputformat mysql");
DruidHook.register(DruidHook.SQL, this); DruidHook.register(DruidHook.SQL, this);
} }

View File

@ -22,16 +22,16 @@ package org.apache.druid.quidem;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import java.io.File; import java.io.File;
import java.util.List; import java.io.IOException;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;
public class QTest extends DruidQuidemTestBase public class QTest extends DruidQuidemTestBase
{ {
public QTest() public QTest()
{ {
super(); super();
assertEquals(QuidemCaptureResource.RECORD_PATH, getTestRoot());
} }
@Override @Override
@ -41,11 +41,14 @@ public class QTest extends DruidQuidemTestBase
} }
@Test @Test
public void aa() { public void ensureNoRecordFilesPresent() throws IOException
{
List<String> n = getFileNames(); // ensure that the captured ones are saved into this test's input path
for(String name : n) { assertEquals(QuidemCaptureResource.RECORD_PATH, getTestRoot());
run(name); for (String name : getFileNames()) {
if (name.startsWith("record-")) {
fail("Record file found: " + name);
}
} }
} }
} }