File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import assert from 'node:assert';
22import fs from 'node:fs' ;
33import path from 'node:path' ;
44import os from 'node:os' ;
5+ import { setTimeout } from 'node:timers/promises' ;
56import { CoreV1Api , KubeConfig , V1Pod } from '../../index.js' ;
67import { Cp } from '../../cp.js' ;
78import { generateName } from './name.js' ;
@@ -40,7 +41,7 @@ export default async function cpFromPod() {
4041 podReady = true ;
4142 break ;
4243 }
43- await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ;
44+ await setTimeout ( 1000 ) ;
4445 }
4546
4647 assert . strictEqual ( podReady , true , 'Pod did not become ready in time' ) ;
@@ -61,7 +62,7 @@ export default async function cpFromPod() {
6162 fileExists = true ;
6263 break ;
6364 }
64- await new Promise ( ( resolve ) => setTimeout ( resolve , 500 ) ) ;
65+ await setTimeout ( 500 ) ;
6566 }
6667
6768 assert . strictEqual ( fileExists , true , 'File was not copied' ) ;
You can’t perform that action at this time.
0 commit comments