Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Apr 13, 2021
1 parent fb482fc commit 1ea7325
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/plugins/data/public/search/search_interceptor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('SearchInterceptor', () => {
await searchInterceptor.search(mockRequest, { sessionId }).toPromise();
expect(fetchMock.mock.calls[0][0]).toEqual(
expect.objectContaining({
options: { sessionId, isStored: true, isRestore: true },
options: { sessionId, isStored: true, isRestore: true, strategy: 'es' },
})
);

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/server/search/session/session_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class SearchSessionService implements ISearchSessionService {
throw new Error('delete not implemented in OSS search session service');
},
getConfig: () => {
return null;
throw new Error('getConfig not implemented in OSS search session service');
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/server/search/session/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface IScopedSearchSessionsClient<T = unknown> {
cancel: (sessionId: string) => Promise<{}>;
delete: (sessionId: string) => Promise<{}>;
extend: (sessionId: string, expires: Date) => Promise<SavedObjectsUpdateResponse<T>>;
getConfig: () => SearchSessionsConfigSchema | null;
getConfig: () => SearchSessionsConfigSchema;
}

export interface ISearchSessionService<T = unknown> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function getIgnoreThrottled(
*/
export async function getDefaultAsyncSubmitParams(
uiSettingsClient: IUiSettingsClient,
searchSessionsConfig: SearchSessionsConfigSchema | null,
searchSessionsConfig: SearchSessionsConfigSchema,
options: ISearchOptions
): Promise<
Pick<
Expand All @@ -54,9 +54,7 @@ export async function getDefaultAsyncSubmitParams(
...(await getDefaultSearchParams(uiSettingsClient)),
...(options.sessionId
? {
keep_alive: searchSessionsConfig
? `${searchSessionsConfig.defaultExpiration.asMilliseconds()}ms`
: '1m',
keep_alive: `${searchSessionsConfig.defaultExpiration.asMilliseconds()}ms`,
}
: {}),
};
Expand Down

0 comments on commit 1ea7325

Please sign in to comment.