mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Closes https://github.com/elastic/kibana/issues/205656 ## Summary ### Problem There seems to be a race condition and state contamination between tests in the KB user instructions tests. ### Solution - Clear knowledge base and conversations after tests - Remove title interceptor --> we don't need title interception for these tests ### Checklist - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
parent
75fe22b604
commit
37d7a5efb7
2 changed files with 13 additions and 18 deletions
|
@ -233,12 +233,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
})
|
||||
.expect(200);
|
||||
|
||||
const interceptPromises = [
|
||||
proxy.interceptConversationTitle('LLM-generated title').completeAfterIntercept(),
|
||||
proxy
|
||||
.interceptConversation({ name: 'conversation', response: 'I, the LLM, hear you!' })
|
||||
.completeAfterIntercept(),
|
||||
];
|
||||
const interceptPromise = proxy
|
||||
.interceptConversation({ name: 'conversation', response: 'I, the LLM, hear you!' })
|
||||
.completeAfterIntercept();
|
||||
|
||||
const messages: Message[] = [
|
||||
{
|
||||
|
@ -283,8 +280,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
},
|
||||
});
|
||||
|
||||
// wait for all interceptors to be settled
|
||||
await Promise.all(interceptPromises);
|
||||
await interceptPromise;
|
||||
|
||||
const conversation = res.body;
|
||||
return conversation;
|
||||
|
@ -297,6 +293,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
after(async () => {
|
||||
proxy.close();
|
||||
await clearKnowledgeBase(es);
|
||||
await clearConversations(es);
|
||||
await deleteActionConnector({ supertest, connectorId, log });
|
||||
});
|
||||
|
||||
|
|
|
@ -37,8 +37,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const svlCommonApi = getService('svlCommonApi');
|
||||
const retry = getService('retry');
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/205656
|
||||
describe.skip('Knowledge base user instructions', function () {
|
||||
describe('Knowledge base user instructions', function () {
|
||||
// TODO: https://github.com/elastic/kibana/issues/192751
|
||||
this.tags(['skipMKI']);
|
||||
let editorRoleAuthc: RoleCredentials;
|
||||
|
@ -248,12 +247,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
})
|
||||
.expect(200);
|
||||
|
||||
const interceptPromises = [
|
||||
proxy.interceptConversationTitle('LLM-generated title').completeAfterIntercept(),
|
||||
proxy
|
||||
.interceptConversation({ name: 'conversation', response: 'I, the LLM, hear you!' })
|
||||
.completeAfterIntercept(),
|
||||
];
|
||||
const interceptPromise = proxy
|
||||
.interceptConversation({ name: 'conversation', response: 'I, the LLM, hear you!' })
|
||||
.completeAfterIntercept();
|
||||
|
||||
const messages: Message[] = [
|
||||
{
|
||||
|
@ -298,8 +294,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
},
|
||||
});
|
||||
|
||||
// wait for all interceptors to be settled
|
||||
await Promise.all(interceptPromises);
|
||||
await interceptPromise;
|
||||
|
||||
const conversation = res.body;
|
||||
return conversation;
|
||||
|
@ -318,6 +313,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
after(async () => {
|
||||
proxy.close();
|
||||
await clearKnowledgeBase(es);
|
||||
await clearConversations(es);
|
||||
await deleteActionConnector({
|
||||
supertest: supertestWithoutAuth,
|
||||
connectorId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue