private Counter getCounter(String counter) {
    CodahaleMetrics metrics = (CodahaleMetrics) MetricsFactory.getInstance();
    SortedMap<String, Counter> counters = metrics.getMetricRegistry().getCounters();

    assertNotNull(counters);
    return counters.get(counter);
  }
Test that checks that the queries above the quota are timed out, so the compilation quota maximum is honored.
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/TestCompileLock.java