Skip to content

Commit b287058

Browse files
committed
z
1 parent f4abf0d commit b287058

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

presto-native-execution/src/test/java/com/facebook/presto/nativeworker/ContainerQueryRunner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import java.util.List;
4545
import java.util.Map;
4646
import java.util.Optional;
47+
import java.util.Properties;
4748
import java.util.concurrent.TimeUnit;
4849
import java.util.concurrent.locks.Lock;
4950
import java.util.logging.Logger;
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package com.facebook.presto.nativeworker;
15+
16+
import com.facebook.presto.tests.AbstractTestQueryFramework;
17+
import org.testng.annotations.Test;
18+
19+
import static org.testng.Assert.assertEquals;
20+
import static org.testng.Assert.assertTrue;
21+
22+
public class TestPrestoContainerRemoteFunction
23+
extends AbstractTestQueryFramework
24+
{
25+
private ContainerQueryRunner queryRunner;
26+
27+
@Override
28+
protected ContainerQueryRunner createQueryRunner()
29+
throws Exception
30+
{
31+
queryRunner = new ContainerQueryRunner();
32+
return queryRunner;
33+
}
34+
35+
@Test
36+
public void testPresenceAndBasicFunctionality()
37+
{
38+
assertTrue(
39+
computeActual("SHOW catalogs").toString().contains("tpch"),
40+
"tpch catalog is not present.");
41+
System.out.println(computeActual("set session remote_functions_enabled=true").toString());
42+
assertEquals(computeActual("select remote.default.abs(-10)").toString(),"10");
43+
}
44+
45+
@Test
46+
public void testPresenceAndBasicFunctionality1()
47+
{
48+
System.out.println(computeActual("SHOW catalogs").toString());
49+
assertEquals(computeActual("select remote.default.abs(-10)").getMaterializedRows().toString(),"10");
50+
}
51+
}

0 commit comments

Comments
 (0)