mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Synthetics] Fix license flaky fetch (#137828)
This commit is contained in:
parent
cc328ff6d5
commit
c03820a9c0
2 changed files with 12 additions and 6 deletions
|
@ -91,8 +91,7 @@ async function updateRoutingAllocations(
|
|||
});
|
||||
}
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/136990
|
||||
describe.skip('incompatible_cluster_routing_allocation', () => {
|
||||
describe('incompatible_cluster_routing_allocation', () => {
|
||||
let client: ElasticsearchClient;
|
||||
let root: Root;
|
||||
|
||||
|
|
|
@ -103,20 +103,27 @@ export class TelemetryEventsSender {
|
|||
this.isSending = false;
|
||||
}
|
||||
|
||||
private async fetchClusterInfo(): Promise<InfoResponse> {
|
||||
private async fetchClusterInfo(): Promise<InfoResponse | undefined> {
|
||||
if (this.esClient === undefined || this.esClient === null) {
|
||||
throw Error('elasticsearch client is unavailable: cannot retrieve cluster information');
|
||||
}
|
||||
|
||||
return await this.esClient.info();
|
||||
try {
|
||||
return await this.esClient.info();
|
||||
} catch (e) {
|
||||
this.logger.debug(`Error fetching cluster information: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
private async fetchLicenseInfo() {
|
||||
if (this.esClient === undefined || this.esClient === null) {
|
||||
throw Error('elasticsearch client is unavailable: cannot retrieve license information');
|
||||
}
|
||||
|
||||
return await this.esClient.license.get();
|
||||
try {
|
||||
return await this.esClient.license.get();
|
||||
} catch (e) {
|
||||
this.logger.debug(`Error fetching license information: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async sendEvents(telemetryUrl: string, queue: TelemetryQueue<any>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue