OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InterruptCommandTest.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl;
2 
3 import static org.junit.Assert.assertEquals;
4 
5 import com.google.gson.JsonObject;
6 import com.omnisci.thrift.calciteserver.TPlanResult;
7 
8 import org.junit.Test;
9 
10 public class InterruptCommandTest extends DDLTest {
13  InterruptCommandTest.class.getClassLoader().getResource("").getPath();
14  jsonTestDir = "interruptcommands";
15  }
16 
17  @Test
18  public void killQuery() throws Exception {
19  final JsonObject expectedJsonObject = getJsonFromFile("kill_query.json");
20  final TPlanResult result = processDdlCommand("KILL QUERY '123-a1b2';");
21  final JsonObject actualJsonObject =
22  gson.fromJson(result.plan_result, JsonObject.class);
23  assertEquals(expectedJsonObject, actualJsonObject);
24  }
25 }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32