public static void main(String[] args) throws IOException, InterruptedException, Exception { org.apache.log4j.BasicConfigurator.configure();
public static void main(String[] args) throws IOException, InterruptedException, Exception { org.apache.log4j.BasicConfigurator.configure();
/** Send a "RollOver" message to <code>ExternallyRolledFileAppender</code> on <code>host</code> and <code>port</code>. */ public static void main(String argv[]) { BasicConfigurator.configure(); if(argv.length == 2) init(argv[0], argv[1]); else usage("Wrong number of arguments."); roll(); }
public static void main(String argv[]) { BasicConfigurator.configure(); ClientContext.init(); run(argv); }
@BeforeClass public void setUp() { BasicConfigurator.configure(); org.apache.log4j.Logger.getRootLogger().setLevel(Level.ERROR); }
public static void main(String[] args) throws IOException, InterruptedException { org.apache.log4j.BasicConfigurator.configure();
@BeforeClass public void setUp() throws IOException { BasicConfigurator.configure(); this.fs = FileSystem.getLocal(new Configuration()); this.path = new Path("MRJobLockTest"); if (!this.fs.exists(this.path)) { this.fs.mkdirs(this.path); } }
public static void main(String[] args) throws IOException, InterruptedException { org.apache.log4j.BasicConfigurator.configure();
public static void main(String[] args) throws Exception { /* configure log info */ org.apache.log4j.BasicConfigurator.configure(); HTSEngineTest test = new HTSEngineTest(); // generate parameters out of a hsmm voice // test.generateParameters(); // extract mfcc from a wav file using sptk // test.getSptkMfcc(); // extract lf0 from a wav file using sptk and snack // test.getSptkSnackLf0(); // Synthesis with external duration and f0 // it requires ContinuousFeatureProcessors in the TARGETFEATURES file test.synthesisWithContinuousFeatureProcessors(); // Synthesis with external duration and f0 // it requires two external files: labels file .lab and logf0 file .lf0 // The duration indicated in the lab file must correspond to the number of frames in the .lf0 file // The lf0 file must be generated frame syncronous. // test.synthesisWithProsodySpecificationInExternalFiles(); }
public static void main(String[] args) throws Exception { /* configure log info */ org.apache.log4j.BasicConfigurator.configure(); HTSEngineTest test = new HTSEngineTest(); // generate parameters out of a hsmm voice // test.generateParameters(); // extract mfcc from a wav file using sptk // test.getSptkMfcc(); // extract lf0 from a wav file using sptk and snack // test.getSptkSnackLf0(); // Synthesis with external duration and f0 // it requires ContinuousFeatureProcessors in the TARGETFEATURES file test.synthesisWithContinuousFeatureProcessors(); // Synthesis with external duration and f0 // it requires two external files: labels file .lab and logf0 file .lf0 // The duration indicated in the lab file must correspond to the number of frames in the .lf0 file // The lf0 file must be generated frame syncronous. // test.synthesisWithProsodySpecificationInExternalFiles(); }
@BeforeClass public static void onlyOnce() { BasicConfigurator.configure(); }
@BeforeClass public static void setUp() throws Exception { BasicConfigurator.configure(); }
@BeforeClass public static void setUp() throws Exception { BasicConfigurator.configure(); }
@BeforeSuite public void setProps() { BasicConfigurator.configure(); Logger.getRootLogger().setLevel(Level.INFO); Logger.getLogger(SimpleEVCacheTest.class).setLevel(Level.DEBUG); Logger.getLogger(Base.class).setLevel(Level.DEBUG); Logger.getLogger(EVCacheImpl.class).setLevel(Level.ERROR); Logger.getLogger(EVCacheClient.class).setLevel(Level.DEBUG); Logger.getLogger(EVCacheClientPool.class).setLevel(Level.DEBUG); System.setProperty("EVCACHE.use.simple.node.list.provider", "true"); System.setProperty("EVCACHE.EVCacheClientPool.readTimeout", "1000"); System.setProperty("EVCACHE.operation.timeout", "100000"); System.setProperty("EVCACHE.EVCacheClientPool.bulkReadTimeout", "10000"); int maxThreads = 2; final BlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>(100000); pool = new ThreadPoolExecutor(maxThreads * 4, maxThreads * 4, 30, TimeUnit.SECONDS, queue); pool.prestartAllCoreThreads(); }
public MaryModuleTestCase(boolean needMaryStarted) throws Exception { if (!MaryUtils.isLog4jConfigured()) { BasicConfigurator.configure(); } Logger.getRootLogger().setLevel(Level.DEBUG); if (System.getProperty("mary.base") == null) { System.setProperty("mary.base", "."); Logger.getRootLogger().warn( "System property 'mary.base' is not defined -- trying " + new File(".").getAbsolutePath() + " -- if this fails, please start this using VM property \"-Dmary.base=/path/to/mary/runtime\"!"); } if (needMaryStarted) { if (Mary.currentState() == Mary.STATE_OFF) Mary.startup(); } }
public MaryModuleTestCase(boolean needMaryStarted) throws Exception { if (!MaryUtils.isLog4jConfigured()) { BasicConfigurator.configure(); } Logger.getRootLogger().setLevel(Level.DEBUG); if (System.getProperty("mary.base") == null) { System.setProperty("mary.base", "."); Logger.getRootLogger().warn( "System property 'mary.base' is not defined -- trying " + new File(".").getAbsolutePath() + " -- if this fails, please start this using VM property \"-Dmary.base=/path/to/mary/runtime\"!"); } if (needMaryStarted) { if (Mary.currentState() == Mary.STATE_OFF) Mary.startup(); } }
@Test public void testV1() throws IOException { BasicConfigurator.configure(); Logger.getRootLogger().setLevel(Level.DEBUG); final String expected = "test"; final String ciphered = "eyJ2ZXIiOiIxLjAiLCJ2YWwiOiJOd1hRejdOMjBXUU05SXEzaE94RVZnPT0ifQ=="; final String passphrase = "test1234"; final Crypto crypto = new Crypto(); final String actual = crypto.decrypt(ciphered, passphrase); Assert.assertEquals(expected, actual); try { new CryptoV1_1().decrypt(ciphered, passphrase); Assert.fail("Should have failed when decrypt v1 ciphered text with v1.1 decryption."); } catch (final Exception e) { Assert.assertTrue(e instanceof RuntimeException); } }
@Test public void testV1_1() throws IOException { BasicConfigurator.configure(); Logger.getRootLogger().setLevel(Level.DEBUG); final String expected = "test"; final String ciphered = "eyJ2ZXIiOiIxLjEiLCJ2YWwiOiJpaE9CM2VzTzBad2F4cHZBV2Z5YUVicHZLQzJBWDJZZnVzS3hVWFN2R3A0PSJ9"; final String passphrase = "test1234"; final Crypto crypto = new Crypto(); final String actual = crypto.decrypt(ciphered, passphrase); Assert.assertEquals(expected, actual); try { new CryptoV1().decrypt(ciphered, passphrase); Assert.fail("Should have failed when decrypt v1.1 ciphered text with v1 decryption."); } catch (final Exception e) { Assert.assertTrue(e instanceof RuntimeException); } }
@Test public void testInvalidParams() throws IOException { BasicConfigurator.configure(); Logger.getRootLogger().setLevel(Level.DEBUG); final String expected = "test"; final String[] cipheredtexts = { "eyJ2ZXIiOiIxLjAiLCJ2YWwiOiJOd1hRejdOMjBXUU05SXEzaE94RVZnPT0ifQ==", null, ""}; final String[] passphrases = {"test1234", null, ""}; for (final String cipheredtext : cipheredtexts) { for (final String passphrase : passphrases) { final Crypto crypto = new Crypto(); if (!StringUtils.isEmpty(cipheredtext) && !StringUtils.isEmpty(passphrase)) { final String actual = crypto.decrypt(cipheredtext, passphrase); Assert.assertEquals(expected, actual); } else { try { crypto.decrypt(cipheredtext, passphrase); Assert.fail("Encyption should have failed with invalid parameters. cipheredtext: " + cipheredtext + " , passphrase: " + passphrase); } catch (final Exception e) { Assert.assertTrue(e instanceof IllegalArgumentException); } } } } } }
BasicConfigurator.configure(new ConsoleAppender( new PatternLayout("%d [%-25t] %-5p: %m%n")));