public static void initClassLogLevels() { Class currentClass = RandomizedContext.current().getTargetClass(); LogLevel annotation = (LogLevel) currentClass.getAnnotation(LogLevel.class); if (annotation == null) { return; } Map<String, Level> previousLevels = LogLevel.Configurer.setLevels(annotation.value()); savedClassLogLevels.putAll(previousLevels); }
final boolean usePoints = (null == usePointsStr) ? randUsePoints : Boolean.parseBoolean(usePointsStr); if (RandomizedContext.current().getTargetClass().isAnnotationPresent(SolrTestCaseJ4.SuppressPointFields.class) || (! usePoints)) { log.info("Using TrieFields (NUMERIC_POINTS_SYSPROP=false) w/NUMERIC_DOCVALUES_SYSPROP="+useDV);
if (tryClose && result != null && RandomizedContext.current().getTargetClass().isAnnotationPresent(SuppressObjectReleaseTracker.class)) { log.warn( "Some resources were not closed, shutdown, or released. This has been ignored due to the SuppressObjectReleaseTracker annotation, trying to close them now.");
final Class<?> suiteClass = RandomizedContext.current().getTargetClass(); final int timeout = determineTimeout(suiteClass);
final Class<?> suiteClass = RandomizedContext.current().getTargetClass(); final int timeout = determineTimeout(suiteClass);
testClass = RandomizedContext.current().getTargetClass(); } catch (Throwable t) {
testClass = RandomizedContext.current().getTargetClass(); } catch (Throwable t) {
@Override public void evaluate() throws Throwable { Class<?> testClass; try { testClass = RandomizedContext.current().getTargetClass(); } catch (Throwable t) { testClass = description.getTestClass(); } validate(testClass); base.evaluate(); } };
@Override public void evaluate() throws Throwable { Class<?> testClass; try { testClass = RandomizedContext.current().getTargetClass(); } catch (Throwable t) { testClass = description.getTestClass(); } validate(testClass); base.evaluate(); } };
private static SSLTestConfig buildSSLConfig() { SSLRandomizer sslRandomizer = SSLRandomizer.getSSLRandomizerForClass(RandomizedContext.current().getTargetClass()); if (Constants.MAC_OS_X) { // see SOLR-9039 // If a solution is found to remove this, please make sure to also update // TestMiniSolrCloudClusterSSL.testSslAndClientAuth as well. sslRandomizer = new SSLRandomizer(sslRandomizer.ssl, 0.0D, (sslRandomizer.debug + " w/ MAC_OS_X supressed clientAuth")); } SSLTestConfig result = sslRandomizer.createSSLTestConfig(); log.info("Randomized ssl ({}) and clientAuth ({}) via: {}", result.isSSLMode(), result.isClientAuthMode(), sslRandomizer.debug); return result; }
if (!RandomizedContext.current().getTargetClass().isAnnotationPresent(SuppressObjectReleaseTracker.class)) { String orr = clearObjectTrackerAndCheckEmpty(20, false); assertNull(orr, orr);