Skip to content

Commit

Permalink
Fix broken UTs on master
Browse files Browse the repository at this point in the history
Summary: Fix broken UTs

Test Plan:
verified manually that the broken UTs run fine after the change.
`sbt "testOnly *YsqlQueryExecutorTest  -- -t *createRestrictedUser"`

Reviewers: dkumar

Reviewed By: dkumar

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D40486
  • Loading branch information
asharma-yb committed Dec 5, 2024
1 parent 41762ab commit 4f4f0fe
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.pac4j.play.LogoutController;
import play.Application;
import play.inject.guice.GuiceApplicationBuilder;

Expand All @@ -39,19 +40,22 @@ public class YsqlQueryExecutorTest extends PlatformGuiceApplicationBaseTest {
protected NodeUniverseManager mockNodeUniverseManager;
protected GFlagsValidation mockGFlagsValidation;
protected HealthChecker healthChecker;
protected LogoutController mockLogoutController;

@Override
protected Application provideApplication() {
mockRuntimeConfig = mock(Config.class);
mockNodeUniverseManager = mock(NodeUniverseManager.class);
mockGFlagsValidation = mock(GFlagsValidation.class);
healthChecker = mock(HealthChecker.class);
mockLogoutController = mock(LogoutController.class);
return new GuiceApplicationBuilder()
.disable(GuiceModule.class)
.configure(testDatabase())
.overrides(bind(NodeUniverseManager.class).toInstance(mockNodeUniverseManager))
.overrides(bind(GFlagsValidation.class).toInstance(mockGFlagsValidation))
.overrides(bind(HealthChecker.class).toInstance(healthChecker))
.overrides(bind(LogoutController.class).toInstance(mockLogoutController))
.overrides(
bind(RuntimeConfigFactory.class)
.toInstance(new DummyRuntimeConfigFactoryImpl(mockRuntimeConfig)))
Expand Down

0 comments on commit 4f4f0fe

Please sign in to comment.