mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
# Backport This will backport the following commits from `main` to `8.12`: - [Unskip `Session Concurrent Limit cleanup` tests. (#173828)](https://github.com/elastic/kibana/pull/173828) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Aleh Zasypkin","email":"aleh.zasypkin@elastic.co"},"sourceCommit":{"committedDate":"2023-12-21T14:48:53Z","message":"Unskip `Session Concurrent Limit cleanup` tests. (#173828)\n\n## Summary\r\n\r\nUnskip `Session Concurrent Limit cleanup` tests.\r\n\r\n__Flaky Test Runner#1 (no changes, only unskipped tests):__\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4666\r\n(x100 - 🔴 1 out of 100)\r\n__Flaky Test Runner#2 (added additional `retry`):__\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4667\r\n(x200 - all 🟢)\r\n\r\n__Fixes: https://github.com/elastic/kibana/issues/149091__","sha":"f6b7df3d6ef1501d36546ff85bd10b954b95ddad","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Security","release_note:skip","Feature:Security/Session Management","v8.12.1","v8.13.0"],"number":173828,"url":"https://github.com/elastic/kibana/pull/173828","mergeCommit":{"message":"Unskip `Session Concurrent Limit cleanup` tests. (#173828)\n\n## Summary\r\n\r\nUnskip `Session Concurrent Limit cleanup` tests.\r\n\r\n__Flaky Test Runner#1 (no changes, only unskipped tests):__\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4666\r\n(x100 - 🔴 1 out of 100)\r\n__Flaky Test Runner#2 (added additional `retry`):__\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4667\r\n(x200 - all 🟢)\r\n\r\n__Fixes: https://github.com/elastic/kibana/issues/149091__","sha":"f6b7df3d6ef1501d36546ff85bd10b954b95ddad"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173828","number":173828,"mergeCommit":{"message":"Unskip `Session Concurrent Limit cleanup` tests. (#173828)\n\n## Summary\r\n\r\nUnskip `Session Concurrent Limit cleanup` tests.\r\n\r\n__Flaky Test Runner#1 (no changes, only unskipped tests):__\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4666\r\n(x100 - 🔴 1 out of 100)\r\n__Flaky Test Runner#2 (added additional `retry`):__\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4667\r\n(x200 - all 🟢)\r\n\r\n__Fixes: https://github.com/elastic/kibana/issues/149091__","sha":"f6b7df3d6ef1501d36546ff85bd10b954b95ddad"}}]}] BACKPORT--> Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
This commit is contained in:
parent
dfa4c60014
commit
ff8069a4cc
1 changed files with 25 additions and 8 deletions
|
@ -150,8 +150,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
});
|
||||
}
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/149091
|
||||
describe.skip('Session Concurrent Limit cleanup', () => {
|
||||
describe('Session Concurrent Limit cleanup', () => {
|
||||
before(async () => {
|
||||
await security.user.create('anonymous_user', {
|
||||
password: 'changeme',
|
||||
|
@ -181,7 +180,10 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
await setTimeoutAsync(500);
|
||||
const basicSessionCookieThree = await loginWithBasic(testUser);
|
||||
|
||||
expect(await getNumberOfSessionDocuments()).to.be(3);
|
||||
log.debug('Waiting for all sessions to be persisted...');
|
||||
await retry.tryForTime(20000, async () => {
|
||||
expect(await getNumberOfSessionDocuments()).to.be(3);
|
||||
});
|
||||
|
||||
// Poke the background task to run
|
||||
await runCleanupTaskSoon();
|
||||
|
@ -210,7 +212,10 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
const basicSessionCookieThree = await loginWithBasic(testUser);
|
||||
const samlSessionCookieThree = await loginWithSAML();
|
||||
|
||||
expect(await getNumberOfSessionDocuments()).to.be(6);
|
||||
log.debug('Waiting for all sessions to be persisted...');
|
||||
await retry.tryForTime(20000, async () => {
|
||||
expect(await getNumberOfSessionDocuments()).to.be(6);
|
||||
});
|
||||
|
||||
// Poke the background task to run
|
||||
await runCleanupTaskSoon();
|
||||
|
@ -243,7 +248,10 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
const basicSessionCookieThree = await loginWithBasic(testUser);
|
||||
const samlSessionCookieThree = await loginWithSAML();
|
||||
|
||||
expect(await getNumberOfSessionDocuments()).to.be(6);
|
||||
log.debug('Waiting for all sessions to be persisted...');
|
||||
await retry.tryForTime(20000, async () => {
|
||||
expect(await getNumberOfSessionDocuments()).to.be(6);
|
||||
});
|
||||
|
||||
// Remove `createdAt` field from the most recent sessions to emulate legacy sessions.
|
||||
// 1. Get the latest session for every unique credentials.
|
||||
|
@ -305,7 +313,10 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
await setTimeoutAsync(500);
|
||||
const basicSessionCookieTwo = await loginWithBasic(testUser);
|
||||
|
||||
expect(await getNumberOfSessionDocuments()).to.be(2);
|
||||
log.debug('Waiting for all sessions to be persisted...');
|
||||
await retry.tryForTime(20000, async () => {
|
||||
expect(await getNumberOfSessionDocuments()).to.be(2);
|
||||
});
|
||||
|
||||
// Poke the background task to run
|
||||
await runCleanupTaskSoon();
|
||||
|
@ -328,7 +339,10 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
const anonymousSessionCookieTwo = await loginWithAnonymous();
|
||||
const anonymousSessionCookieThree = await loginWithAnonymous();
|
||||
|
||||
expect(await getNumberOfSessionDocuments()).to.be(3);
|
||||
log.debug('Waiting for all sessions to be persisted...');
|
||||
await retry.tryForTime(20000, async () => {
|
||||
expect(await getNumberOfSessionDocuments()).to.be(3);
|
||||
});
|
||||
|
||||
// Poke the background task to run
|
||||
await runCleanupTaskSoon();
|
||||
|
@ -357,7 +371,10 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
const unauthenticatedSessionTwo = await startSAMLHandshake();
|
||||
const unauthenticatedSessionThree = await startSAMLHandshake();
|
||||
|
||||
expect(await getNumberOfSessionDocuments()).to.be(3);
|
||||
log.debug('Waiting for all sessions to be persisted...');
|
||||
await retry.tryForTime(20000, async () => {
|
||||
expect(await getNumberOfSessionDocuments()).to.be(3);
|
||||
});
|
||||
|
||||
// Poke the background task to run
|
||||
await runCleanupTaskSoon();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue