private void checkMysqldFile() { File mysqld = mysqldResource.makeMysqld(); assertTrue(mysqld.exists()); assertTrue(mysqld.length() > 100); }
private void checkMysqldFile() { File mysqld = mysqldResource.makeMysqld(); assertTrue(mysqld.exists()); assertTrue(mysqld.length() > 100); }
public void testUnknownOs() { mysqldResource.setOsAndArch("bogus", "x86"); Exception expected = null; try { mysqldResource.makeMysqld(); } catch (MissingResourceException e) { expected = e; } assertNotNull("" + mysqldResource.getMysqldFilePointer(), expected); assertTrue(expected.getMessage().indexOf("bogus") > 0); }
public void testUnknownOs() { mysqldResource.setOsAndArch("bogus", "x86"); Exception expected = null; try { mysqldResource.makeMysqld(); } catch (MissingResourceException e) { expected = e; } assertNotNull("" + mysqldResource.getMysqldFilePointer(), expected); assertTrue(expected.getMessage().indexOf("bogus") > 0); }
public void deployFiles() { makeMysqld(); ensureEssentialFilesExist(); try { makeMysqlClient(); } catch (MissingResourceException e) { printMessage(e.getMessage() + " - OK."); } }
/** called from option parser as well */ synchronized Shell exec(String threadName, Map mysqldArgs, PrintStream outStream, PrintStream errStream, boolean withListeners) { mysqldArgs.put(MysqldResourceI.BASEDIR, baseDir.getPath()); mysqldArgs.put(MysqldResourceI.PID_FILE, pidFile().getPath()); socket(mysqldArgs); File dataDir = dataDir(mysqldArgs); makeMysqld(); ensureEssentialFilesExist(dataDir); String[] args = constructArgs(mysqldArgs); outStream.println(str.toString(args)); Shell launch = shellFactory.newShell(args, threadName, outStream, errStream); if (withListeners) { for (int i = 0; i < completionListensers.size(); i++) { Runnable listener = (Runnable) completionListensers.get(i); launch.addCompletionListener(listener); } } launch.setDaemon(true); printMessage("launching mysqld (" + threadName + ")"); launch.start(); return launch; }
private Shell exec(String threadName, Map mysqldArgs, PrintStream outStream, PrintStream errStream, boolean withListeners) { makeMysqld(); ensureEssentialFilesExist(); adjustParameterMap(mysqldArgs); String[] args = constructArgs(mysqldArgs); outStream.println(new ListToString().toString(args)); log.info("starting mysqld: " + new ListToString().toString(args)); Shell launch = utils.shellFactory().newShell(args, threadName, outStream, errStream); if (withListeners) { for (int i = 0; i < completionListensers.size(); i++) { Runnable listener = (Runnable) completionListensers.get(i); launch.addCompletionListener(listener); } } launch.setDaemon(true); printMessage("launching mysqld (" + threadName + ")"); launch.start(); return launch; }