diff --git a/examples/search_examples/server/fibonacci_strategy.ts b/examples/search_examples/server/fibonacci_strategy.ts index 8317834dcbb3d..8a33872cdb7e7 100644 --- a/examples/search_examples/server/fibonacci_strategy.ts +++ b/examples/search_examples/server/fibonacci_strategy.ts @@ -8,6 +8,7 @@ import { v4 as uuidv4 } from 'uuid'; import { ISearchStrategy } from '@kbn/data-plugin/server'; +import { of } from 'rxjs'; import { FibonacciRequest, FibonacciResponse } from '../common/types'; export const fibonacciStrategyProvider = (): ISearchStrategy< @@ -40,10 +41,7 @@ export const fibonacciStrategyProvider = (): ISearchStrategy< const took = Date.now() - started; const values = sequence.slice(0, loaded); - // Usually we'd do something like "of()" but for some reason it breaks in tests with the error - // "You provided an invalid object where a stream was expected." which is why we have to cast - // down below as well - return [{ id, loaded, total, isRunning, isPartial, rawResponse: { took, values } }]; + return of({ id, loaded, total, isRunning, isPartial, rawResponse: { took, values } }); }, cancel: async (id: string) => { responseMap.delete(id); diff --git a/x-pack/test/examples/search_examples/partial_results_example.ts b/x-pack/test/examples/search_examples/partial_results_example.ts index f7d199463e256..269b2e79ab38f 100644 --- a/x-pack/test/examples/search_examples/partial_results_example.ts +++ b/x-pack/test/examples/search_examples/partial_results_example.ts @@ -14,8 +14,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common']); const retry = getService('retry'); - // FLAKY: https://github.com/elastic/kibana/issues/116038 - describe.skip('Partial results example', () => { + describe('Partial results example', () => { before(async () => { await PageObjects.common.navigateToApp('searchExamples'); await testSubjects.click('/search');