Skip to content

Commit

Permalink
Fix type mismatch (#2990)
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chu <[email protected]>
(cherry picked from commit 06c56e7)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Sep 5, 2024
1 parent 2729f46 commit 1c70d4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public void compose(
SparkSubmitParameters sparkSubmitParameters,
DispatchQueryRequest dispatchQueryRequest,
AsyncQueryRequestContext context) {
String externalSchedulerEnabled =
Boolean externalSchedulerEnabled =
settings.getSettingValue(Settings.Key.ASYNC_QUERY_EXTERNAL_SCHEDULER_ENABLED);
String externalSchedulerInterval =
settings.getSettingValue(Settings.Key.ASYNC_QUERY_EXTERNAL_SCHEDULER_INTERVAL);
sparkSubmitParameters.setConfigItem(
FLINT_JOB_EXTERNAL_SCHEDULER_ENABLED, externalSchedulerEnabled);
FLINT_JOB_EXTERNAL_SCHEDULER_ENABLED, String.valueOf(externalSchedulerEnabled));
sparkSubmitParameters.setConfigItem(
FLINT_JOB_EXTERNAL_SCHEDULER_INTERVAL, externalSchedulerInterval);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void setUp() {
@Test
public void testCompose() {
when(settings.getSettingValue(Settings.Key.ASYNC_QUERY_EXTERNAL_SCHEDULER_ENABLED))
.thenReturn("true");
.thenReturn(true);
when(settings.getSettingValue(Settings.Key.ASYNC_QUERY_EXTERNAL_SCHEDULER_INTERVAL))
.thenReturn("10 minutes");

Expand All @@ -46,7 +46,7 @@ public void testCompose() {
@Test
public void testComposeWithDisabledScheduler() {
when(settings.getSettingValue(Settings.Key.ASYNC_QUERY_EXTERNAL_SCHEDULER_ENABLED))
.thenReturn("false");
.thenReturn(false);

composer.compose(sparkSubmitParameters, dispatchQueryRequest, context);

Expand All @@ -57,7 +57,7 @@ public void testComposeWithDisabledScheduler() {
@Test
public void testComposeWithMissingInterval() {
when(settings.getSettingValue(Settings.Key.ASYNC_QUERY_EXTERNAL_SCHEDULER_ENABLED))
.thenReturn("true");
.thenReturn(true);
when(settings.getSettingValue(Settings.Key.ASYNC_QUERY_EXTERNAL_SCHEDULER_INTERVAL))
.thenReturn("");

Expand Down

0 comments on commit 1c70d4f

Please sign in to comment.