(Exchange exchange)
| 956 | } |
| 957 | |
| 958 | public java.util.concurrent.CompletableFuture<Object> testProxies(Exchange exchange) |
| 959 | { |
| 960 | |
| 961 | return java.util.concurrent.CompletableFuture.supplyAsync(() -> { |
| 962 | |
| 963 | // these tests should be synchronously executed, because of conflicting nature of proxy settings |
| 964 | Object proxyTestName = this.proxyTestFileName; |
| 965 | // todo: temporary skip for sync py |
| 966 | if (Helpers.isTrue(Helpers.isTrue(Helpers.isEqual(this.ext, "py")) && Helpers.isTrue(isSync()))) |
| 967 | { |
| 968 | return true; |
| 969 | } |
| 970 | // try proxy several times |
| 971 | Object maxRetries = 3; |
| 972 | Object exception = null; |
| 973 | for (var j = 0; Helpers.isLessThan(j, maxRetries); j++) |
| 974 | { |
| 975 | try |
| 976 | { |
| 977 | (this.testMethod(proxyTestName, exchange, new java.util.ArrayList<Object>(java.util.Arrays.asList()), true)).join(); |
| 978 | return true; // if successfull, then end the test |
| 979 | } catch(Exception e) |
| 980 | { |
| 981 | exception = e; |
| 982 | (exchange.sleep(Helpers.multiply(j, 1000))).join(); |
| 983 | } |
| 984 | } |
| 985 | // if exception was set, then throw it |
| 986 | if (Helpers.isTrue(!Helpers.isEqual(exception, null))) |
| 987 | { |
| 988 | Object errorMessage = Helpers.add(Helpers.add(Helpers.add("[TEST_FAILURE] Failed ", proxyTestName), " : "), exceptionMessage(exception)); |
| 989 | // temporary comment the below, because c# transpilation failure |
| 990 | // throw new Exchange Error (errorMessage.toString ()); |
| 991 | dump(Helpers.add("[TEST_WARNING]", errorMessage)); |
| 992 | } |
| 993 | return true; |
| 994 | }); |
| 995 | |
| 996 | } |
| 997 | |
| 998 | public void checkConstructor(Exchange exchange) |
| 999 | { |
nothing calls this directly
no test coverage detected