Package org.apache.calcite.adapter.os
Class OsAdapterTest
- java.lang.Object
-
- org.apache.calcite.adapter.os.OsAdapterTest
-
public class OsAdapterTest extends java.lang.Object
Unit tests for the OS (operating system) adapter.Also please run the following tests manually, from your shell:
- ./sqlsh select \* from du
- ./sqlsh select \* from files
- ./sqlsh select \* from git_commits
- ./sqlsh select \* from ps
- (echo cats; echo and dogs) | ./sqlsh select \* from stdin
- ./sqlsh select \* from vmstat
-
-
Constructor Summary
Constructors Constructor Description OsAdapterTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
assumeToolExists(java.lang.String command)
private static boolean
checkProcessExists(java.lang.String command)
private java.lang.String
foo(java.lang.String... args)
private static boolean
hasGit()
Returns whether there is a ".git" directory in this directory or in a directory between this directory and root.private static boolean
isWindows()
(package private) static CalciteAssert.AssertQuery
sql(java.lang.String sql)
void
testDu()
void
testDuFilterSortLimit()
void
testFiles()
void
testGitCommits()
void
testGitCommitsTop()
void
testPs()
void
testPsDistinct()
void
testSqlShellFormat()
void
testSqlShellHelp()
void
testStdin()
void
testStdinExplain()
void
testVmstat()
-
-
-
Method Detail
-
isWindows
private static boolean isWindows()
-
hasGit
private static boolean hasGit()
Returns whether there is a ".git" directory in this directory or in a directory between this directory and root.
-
assumeToolExists
private static void assumeToolExists(java.lang.String command)
-
checkProcessExists
private static boolean checkProcessExists(java.lang.String command)
-
testDu
public void testDu()
-
testDuFilterSortLimit
public void testDuFilterSortLimit()
-
testFiles
public void testFiles()
-
testPs
public void testPs()
-
testPsDistinct
public void testPsDistinct()
-
testGitCommits
public void testGitCommits()
-
testGitCommitsTop
public void testGitCommitsTop()
-
testVmstat
public void testVmstat()
-
testStdin
public void testStdin() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
testStdinExplain
public void testStdinExplain()
-
testSqlShellFormat
public void testSqlShellFormat() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
foo
private java.lang.String foo(java.lang.String... args) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
testSqlShellHelp
public void testSqlShellHelp() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
sql
static CalciteAssert.AssertQuery sql(java.lang.String sql)
-
-