Skip to content

Commit

Permalink
[CALCITE-5923] Some test cases in violates the test fixture's design …
Browse files Browse the repository at this point in the history
…principle
  • Loading branch information
herunkang2018 committed Aug 13, 2023
1 parent 50c3edf commit 885a99f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
Expand Down Expand Up @@ -197,6 +198,7 @@
* null arguments or null results.</li>
* </ul>
*/
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@SuppressWarnings("MethodCanBeStatic")
public class SqlOperatorTest {
//~ Static fields/initializers ---------------------------------------------
Expand Down Expand Up @@ -441,8 +443,8 @@ protected SqlOperatorFixture fixture() {
}

/** Generates parameters to test both regular and safe cast. */
static Stream<Arguments> safeParameters() {
SqlOperatorFixture f = SqlOperatorFixtureImpl.DEFAULT;
private Stream<Arguments> safeParameters() {
SqlOperatorFixture f = fixture();
SqlOperatorFixture f2 =
SqlOperatorFixtures.safeCastWrapper(f.withLibrary(SqlLibrary.BIG_QUERY), "SAFE_CAST");
SqlOperatorFixture f3 =
Expand Down Expand Up @@ -11909,7 +11911,7 @@ private static void checkLogicalOrFunc(SqlOperatorFixture f) {
}

@Test void testArgMin() {
final SqlOperatorFixture f0 = fixture().withTester(t -> TESTER);
final SqlOperatorFixture f0 = fixture();
final String[] xValues = {"2", "3", "4", "4", "5", "7"};

final Consumer<SqlOperatorFixture> consumer = f -> {
Expand Down

0 comments on commit 885a99f

Please sign in to comment.