Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,14 @@ public abstract class BaseHiveConnectorTest
private static final DateTimeFormatter TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSSSSS");
private final String catalog;
private final Session bucketedSession;
private final Map<String, String> extraProperties;

protected BaseHiveConnectorTest(Map<String, String> extraProperties)
protected BaseHiveConnectorTest()
{
this.catalog = HIVE_CATALOG;
this.bucketedSession = createBucketedSession(Optional.of(new SelectedRole(ROLE, Optional.of("admin"))));
this.extraProperties = ImmutableMap.copyOf(requireNonNull(extraProperties, "extraProperties is null"));
}

@Override
protected final QueryRunner createQueryRunner()
protected static QueryRunner createHiveQueryRunner(Map<String, String> extraProperties)
throws Exception
{
DistributedQueryRunner queryRunner = HiveQueryRunner.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
package io.trino.plugin.hive;

import io.trino.testing.FaultTolerantExecutionConnectorTestHelper;
import io.trino.testing.QueryRunner;

import static org.assertj.core.api.Assertions.assertThatThrownBy;

public class TestHiveFaultTolerantExecutionConnectorTest
extends BaseHiveConnectorTest
{
public TestHiveFaultTolerantExecutionConnectorTest()
@Override
protected QueryRunner createQueryRunner()
throws Exception
{
super(FaultTolerantExecutionConnectorTestHelper.getExtraProperties());
return BaseHiveConnectorTest.createHiveQueryRunner(FaultTolerantExecutionConnectorTestHelper.getExtraProperties());
Comment thread
findepi marked this conversation as resolved.
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
package io.trino.plugin.hive;

import com.google.common.collect.ImmutableMap;
import io.trino.testing.QueryRunner;

public class TestHivePipelinedExecutionConnectorTest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does "pipelined execution" mean here?

it this is "test hive with defaults", let's call the class just TestHiveConnectorTest

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - effectively it is with defaults (no failure recovery). I will rename in a separate PR after this gets merged.

extends BaseHiveConnectorTest
{
public TestHivePipelinedExecutionConnectorTest()
@Override
protected QueryRunner createQueryRunner()
throws Exception
{
super(ImmutableMap.of());
return BaseHiveConnectorTest.createHiveQueryRunner(ImmutableMap.of());
}
}