package sqlancer.dbms;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

import org.junit.jupiter.api.Test;

import sqlancer.Main;

public class TestMySQL {

    @Test
    public void testMySQL() {
        String mysqlAvailable = System.getenv("MYSQL_AVAILABLE");
        boolean mysqlIsAvailable = mysqlAvailable != null && mysqlAvailable.equalsIgnoreCase("true");
        assumeTrue(mysqlIsAvailable);
        assertEquals(0,
                Main.executeMain(new String[] { "--random-seed", "0", "--timeout-seconds", TestConfig.SECONDS,
                        "--max-expression-depth", "1", "--num-threads", "1", "--num-queries", TestConfig.NUM_QUERIES,
                        "mysql" }));
    }

}

@@ -228,52 +228,8 @@
  %7B%0A%0A
-    @Test%0A    public void testMySQL() %7B%0A    
     
@@ -282,28 +282,24 @@
 VAILABLE%22);%0A
-    
     boolean 
@@ -383,16 +383,57 @@
 %22true%22);
+%0A%0A    @Test%0A    public void testMySQL() %7B
 %0A       
@@ -667,25 +667,25 @@
 -threads%22, %22
-1
+4
 %22, %22--num-qu
@@ -760,10 +760,507 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testPQS() %7B%0A        assumeTrue(mysqlIsAvailable);%0A        assertEquals(0,%0A                Main.executeMain(new String%5B%5D %7B %22--random-seed%22, %220%22, %22--timeout-seconds%22, TestConfig.SECONDS,%0A                        %22--num-threads%22, %224%22, %22--random-string-generation%22, %22ALPHANUMERIC%22, %22--database-prefix%22,%0A                        %22pqsdb%22 /* Workaround for connections not being closed */, %22--num-queries%22, %22100000%22, %22mysql%22,%0A                        %22--oracle%22, %22PQS%22 %7D));%0A    %7D%0A%0A
 %7D%0A

Add tests for the PQS implementation