/** * Starts the vert.x instance. */ @Override public void run() { this.run(null); }
/** * Exits the JVM and indicate an issue with the system configuration. */ public static void exitBecauseOfSystemConfigurationIssue() { exit(SYSTEM_CONFIGURATION_EXIT_CODE); }
/** * Stop the redeployment if started. */ protected synchronized void shutdownRedeployment() { if (watcher != null) { watcher.close(); watcher = null; } }
private static boolean matchPathPattern(String pattern, String str, String separator, boolean isCaseSensitive) { if (separatorPatternStartSlashMismatch(pattern, str, separator)) { return false; } String[] patDirs = tokenizePathToString(pattern, separator); String[] strDirs = tokenizePathToString(str, separator); return matchPathPattern(patDirs, strDirs, isCaseSensitive); }
private void waitForShutdown() { assertWaitUntil(() -> { try { getHttpCode(); } catch (IOException e) { return true; } return false; }); }
/** * Tests whether or not a given path matches a given pattern. * * @param pattern The pattern to match against. Must not be * {@code null}. * @param str The path to match, as a String. Must not be * {@code null}. * @return {@code true} if the pattern matches against the string, * or {@code false} otherwise. */ public static boolean matchPath(String pattern, String str) { return matchPath(pattern, str, true); }
public void run() { shutdownRedeployment(); } });
private void waitForTermination() { assertWaitUntil(() -> { try { RunCommandTest.getHttpCode(); return false; } catch (IOException e) { return true; } }); }
/** * Starts the vert.x instance and sets the final action (called when vert.x is closed). * * @param action the action, can be {@code null} */ public void run(Runnable action) { this.finalAction = action; vertx = startVertx(); }
/** * @return the metric options. */ protected MetricsOptions getMetricsOptions() { return getMetricsOptions(null); }
protected static boolean matchPath(String pattern, String str, String separator, boolean isCaseSensitive) { return matchPathPattern(pattern, str, separator, isCaseSensitive); }
protected JsonObject getConfiguration() { return getJsonFromFileOrString(config, "conf"); }
@Override public CLI define() { return GoodByeCommand.define(); } }
protected void assertWaitUntil(BooleanSupplier supplier) { // Extend to 20 seconds for CI assertWaitUntil(supplier, 20000); }
/** * Exits the JVM and indicate an issue with a process creation or termination. */ public static void exitBecauseOfProcessIssue() { exit(PROCESS_ERROR_EXIT_CODE); }
private void waitForStartup() { assertWaitUntil(() -> { try { return getHttpCode() == 200; } catch (IOException e) { // Ignore it. } return false; }); }
/** * Tests whether or not a given path matches a given pattern. * * @param pattern The pattern to match against. Must not be * {@code null}. * @param str The path to match, as a String. Must not be * {@code null}. * @param isCaseSensitive Whether or not matching should be performed * case sensitively. * @return {@code true} if the pattern matches against the string, * or {@code false} otherwise. */ public static boolean matchPath(String pattern, String str, boolean isCaseSensitive) { return matchPath(pattern, str, File.separator, isCaseSensitive); }
/** * Exits the JVM and indicate an issue during the Vert.x initialization. */ public static void exitBecauseOfVertxInitializationIssue() { exit(VERTX_INITIALIZATION_EXIT_CODE); }
/** * Exits the JVM and indicate an issue during the deployment of the main verticle. */ public static void exitBecauseOfVertxDeploymentIssue() { exit(VERTX_DEPLOYMENT_EXIT_CODE); }