File tree Expand file tree Collapse file tree
src/test/kotlin/eu/openanalytics/shinyproxyoperator/helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ abstract class IntegrationTestBase {
127127 }
128128
129129 private suspend fun deleteNamespaces () {
130- do {
130+ while ( true ) {
131131 for (managedNamespace in managedNamespaces) {
132132 try {
133133 val ns = stableClient.namespaces().withName(managedNamespace).get() ? : continue
@@ -141,7 +141,18 @@ abstract class IntegrationTestBase {
141141 }
142142 delay(1000 )
143143 }
144- } while (managedNamespaces.any { stableClient.namespaces().withName(it).get() != null })
144+ try {
145+ if (managedNamespaces.all { stableClient.namespaces().withName(it).get() == null }) {
146+ break
147+ }
148+ } catch (_: KubernetesClientException ) {
149+ // ignore and try again
150+ } catch (_: RejectedExecutionException ) {
151+ // ignore and try again
152+ } catch (_: InterruptedException ) {
153+ // ignore and try again
154+ }
155+ }
145156 }
146157
147158 private suspend fun deleteCRD () {
You can’t perform that action at this time.
0 commit comments