File tree Expand file tree Collapse file tree 2 files changed +27
-8
lines changed
aws-parallelcluster-environment/test/controls
aws-parallelcluster-shared/test/libraries Expand file tree Collapse file tree 2 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 1919 its ( 'version' ) { should cmp >= minimal_lustre_client_version }
2020 end
2121
22- describe yum . repo ( 'aws-fsx' ) do
23- it { should exist }
24- it { should be_enabled }
25- its ( 'baseurl' ) { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
22+ with_retry ( retries : 3 , delay : 10 ) do
23+ describe yum . repo ( 'aws-fsx' ) do
24+ it { should exist }
25+ it { should be_enabled }
26+ its ( 'baseurl' ) { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
27+ end
2628 end
2729 end
2830 end
4749 its ( 'version' ) { should cmp >= minimal_lustre_client_version }
4850 end
4951
50- describe yum . repo ( 'aws-fsx' ) do
51- it { should exist }
52- it { should be_enabled }
53- its ( 'baseurl' ) { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
52+ with_retry ( retries : 3 , delay : 5 ) do
53+ describe yum . repo ( 'aws-fsx' ) do
54+ it { should exist }
55+ it { should be_enabled }
56+ its ( 'baseurl' ) { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
57+ end
5458 end
5559 end
5660 end
Original file line number Diff line number Diff line change 1+ # Helper method to retry flaky InSpec checks
2+ def with_retry ( retries : 3 , delay : 5 )
3+ attempts = 0
4+ begin
5+ attempts += 1
6+ yield
7+ rescue => e
8+ if attempts < retries
9+ sleep delay
10+ retry
11+ else
12+ raise e
13+ end
14+ end
15+ end
You can’t perform that action at this time.
0 commit comments