Skip to content

Commit

Permalink
Remove usage of static classes in KuduConnectorTests
Browse files Browse the repository at this point in the history
Static test classes with testng lead to unexpected behavior during
test failures, switch to using top level classes instead
  • Loading branch information
grantatspothero authored and ebyhr committed Mar 2, 2022
1 parent 04d9fbe commit c8daf6b
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 100 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.plugin.kudu;

import static io.trino.plugin.kudu.TestingKuduServer.LATEST_TAG;

public class TestKuduLatestWithDisabledInferSchemaConnectorTest
extends AbstractKuduWithDisabledInferSchemaConnectorTest
{
@Override
protected String getKuduServerVersion()
{
return LATEST_TAG;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.plugin.kudu;

import static io.trino.plugin.kudu.TestingKuduServer.LATEST_TAG;

public class TestKuduLatestWithEmptyInferSchemaConnectorTest
extends AbstractKuduWithEmptyInferSchemaConnectorTest
{
@Override
protected String getKuduServerVersion()
{
return LATEST_TAG;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.plugin.kudu;

import static io.trino.plugin.kudu.TestingKuduServer.LATEST_TAG;

public class TestKuduLatestWithStandardInferSchemaConnectorTest
extends AbstractKuduWithStandardInferSchemaConnectorTest
{
@Override
protected String getKuduServerVersion()
{
return LATEST_TAG;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.plugin.kudu;

import static io.trino.plugin.kudu.TestingKuduServer.EARLIEST_TAG;

public class TestKuduWithDisabledInferSchemaConnectorTest
extends AbstractKuduWithDisabledInferSchemaConnectorTest
{
@Override
protected String getKuduServerVersion()
{
return EARLIEST_TAG;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.plugin.kudu;

import static io.trino.plugin.kudu.TestingKuduServer.EARLIEST_TAG;

public class TestKuduWithEmptyInferSchemaConnectorTest
extends AbstractKuduWithEmptyInferSchemaConnectorTest
{
@Override
protected String getKuduServerVersion()
{
return EARLIEST_TAG;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.plugin.kudu;

import static io.trino.plugin.kudu.TestingKuduServer.EARLIEST_TAG;

public class TestKuduWithStandardInferSchemaConnectorTest
extends AbstractKuduWithStandardInferSchemaConnectorTest
{
@Override
protected String getKuduServerVersion()
{
return EARLIEST_TAG;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class TestingKuduServer
implements Closeable
{
private static final String KUDU_IMAGE = "apache/kudu";
public static final String EARLIEST_TAG = "1.13.0";
public static final String LATEST_TAG = "1.15.0";

private static final Integer KUDU_MASTER_PORT = 7051;
private static final Integer KUDU_TSERVER_PORT = 7050;
private static final Integer NUMBER_OF_REPLICA = 3;
Expand All @@ -49,8 +52,7 @@ public class TestingKuduServer

public TestingKuduServer()
{
// This version should match the kudu client version
this("1.15.0");
this(LATEST_TAG);
}

/**
Expand Down

0 comments on commit c8daf6b

Please sign in to comment.