Skip to content

Commit

Permalink
Add a constructor to QueryAssertions
Browse files Browse the repository at this point in the history
Cherry-pick of
trinodb/trino@7efb49c

Co-authored-by: Martin Traverso <mtraverso@gmail.com>
  • Loading branch information
2 people authored and zhenxiao committed Dec 20, 2022
1 parent 13ca62f commit f6a0a03
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static com.facebook.presto.testing.TestingSession.testSessionBuilder;
import static com.google.common.base.Strings.nullToEmpty;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;

Expand Down Expand Up @@ -63,6 +64,11 @@ public QueryAssertions(Session session)
runner = new LocalQueryRunner(session);
}

public QueryAssertions(QueryRunner runner)
{
this.runner = requireNonNull(runner, "runner is null");
}

public QueryRunner getQueryRunner()
{
return runner;
Expand Down

0 comments on commit f6a0a03

Please sign in to comment.