mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* add throttling to reporting watches
* fix duplicate check
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 25ac988d47
)
Co-authored-by: Marius Dragomir <marius-dr@users.noreply.github.com>
This commit is contained in:
parent
9abb4884e4
commit
108364f90e
3 changed files with 6 additions and 3 deletions
|
@ -48,6 +48,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
interval: `${interval}s`,
|
||||
},
|
||||
},
|
||||
throttle_period: '15m',
|
||||
actions: {
|
||||
email_admin: {
|
||||
email: {
|
||||
|
|
|
@ -42,6 +42,7 @@ export default ({ getService, getPageObjects }) => {
|
|||
interval: `${interval}s`,
|
||||
},
|
||||
},
|
||||
throttle_period: '15m',
|
||||
actions: {
|
||||
email_admin: {
|
||||
email: {
|
||||
|
@ -78,6 +79,7 @@ export default ({ getService, getPageObjects }) => {
|
|||
it('should successfully add a new watch for PNG Reporting', async () => {
|
||||
await putWatcher(watch, id, body, client, log);
|
||||
});
|
||||
|
||||
it('should be successful and increment revision', async () => {
|
||||
await getWatcher(watch, id, client, log, PageObjects.common, retry.tryForTime.bind(retry));
|
||||
});
|
||||
|
|
|
@ -18,11 +18,11 @@ export const putWatcher = async (watch, id, body, client, log) => {
|
|||
expect(putWatchResponse.body._version).to.eql('1');
|
||||
};
|
||||
export const getWatcher = async (watch, id, client, log, common, tryForTime) => {
|
||||
await common.sleep(50000);
|
||||
await common.sleep(10000);
|
||||
await tryForTime(
|
||||
250000,
|
||||
async () => {
|
||||
await common.sleep(25000);
|
||||
await common.sleep(3000);
|
||||
|
||||
await watcherHistory(id, client, log);
|
||||
|
||||
|
@ -31,7 +31,7 @@ export const getWatcher = async (watch, id, client, log, common, tryForTime) =>
|
|||
expect(getWatchResponse.body._id).to.eql(id);
|
||||
expect(getWatchResponse.body._version).to.be.above(1);
|
||||
log.debug(`\n getWatchResponse.body._version: ${getWatchResponse.body._version}`);
|
||||
expect(getWatchResponse.body.status.execution_state).to.eql('executed');
|
||||
expect(getWatchResponse.body.status.execution_state).to.eql('throttled');
|
||||
expect(getWatchResponse.body.status.actions.email_admin.last_execution.successful).to.eql(
|
||||
true
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue