locking test improvements
parent
999ca1ba26
commit
fcc3348295
|
@ -169,24 +169,23 @@ class Kubernetes implements ProviderInterface {
|
||||||
}
|
}
|
||||||
await this.cleanupTaskResources();
|
await this.cleanupTaskResources();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
// let errorParsed;
|
let errorParsed;
|
||||||
// try {
|
try {
|
||||||
// // errorParsed = JSON.parse(error);
|
errorParsed = JSON.parse(error);
|
||||||
// } catch {
|
} catch {
|
||||||
// // errorParsed = error;
|
errorParsed = error;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// const errorMessage =
|
const errorMessage =
|
||||||
// errorParsed.name || errorParsed.reason || errorParsed.response?.body?.reason || errorParsed.message;
|
errorParsed.name || errorParsed.reason || errorParsed.response?.body?.reason || errorParsed.message;
|
||||||
|
|
||||||
const continueStreaming = false;
|
const continueStreaming =
|
||||||
|
errorMessage.includes(`dial timeout, backstop`) ||
|
||||||
// errorMessage.includes(`dial timeout, backstop`) ||
|
errorMessage.includes(`HttpError`) ||
|
||||||
// errorMessage.includes(`HttpError`) ||
|
errorMessage.includes(`HttpError: HTTP request failed`) ||
|
||||||
// errorMessage.includes(`HttpError: HTTP request failed`) ||
|
errorMessage.includes(`an error occurred when try to find container`) ||
|
||||||
// errorMessage.includes(`an error occurred when try to find container`) ||
|
errorMessage.includes(`not found`) ||
|
||||||
// errorMessage.includes(`not found`) ||
|
errorMessage.includes(`Not Found`);
|
||||||
// errorMessage.includes(`Not Found`);
|
|
||||||
if (continueStreaming) {
|
if (continueStreaming) {
|
||||||
CloudRunnerLogger.log('Log Stream Container Not Found');
|
CloudRunnerLogger.log('Log Stream Container Not Found');
|
||||||
await new Promise((resolve) => resolve(5000));
|
await new Promise((resolve) => resolve(5000));
|
||||||
|
|
|
@ -123,7 +123,7 @@ class KubernetesTaskRunner {
|
||||||
await waitUntil(
|
await waitUntil(
|
||||||
async () => {
|
async () => {
|
||||||
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
|
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
|
||||||
const events = await kubeClient.readNamespacedEvent(podName, namespace);
|
const events = await kubeClient.listNamespacedEvent(namespace);
|
||||||
const phase = status?.body.status?.phase;
|
const phase = status?.body.status?.phase;
|
||||||
success = phase === 'Running';
|
success = phase === 'Running';
|
||||||
CloudRunnerLogger.log(
|
CloudRunnerLogger.log(
|
||||||
|
|
Loading…
Reference in New Issue