Skip to content

Commit

Permalink
Fix flaky tests (#14345)
Browse files Browse the repository at this point in the history
  • Loading branch information
bziobrowski authored Jan 21, 2025
1 parent fbbabd4 commit 701cc1e
Show file tree
Hide file tree
Showing 99 changed files with 2,190 additions and 1,538 deletions.
4 changes: 3 additions & 1 deletion pinot-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration combine.children="override">
<configuration combine.children="override">
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<properties>
<property>
<name>usedefaultlisteners</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

package org.apache.pinot.common.metrics.prometheus.dropwizard;

import org.apache.pinot.common.metrics.BrokerGauge;
import org.apache.pinot.common.metrics.BrokerMeter;
import org.apache.pinot.common.metrics.BrokerTimer;
import org.apache.pinot.common.metrics.prometheus.BrokerPrometheusMetricsTest;
import org.apache.pinot.plugin.metrics.dropwizard.DropwizardMetricsFactory;
import org.apache.pinot.spi.annotations.metrics.PinotMetricsFactory;
Expand All @@ -28,7 +31,7 @@
/**
* Disabling tests as Pinot currently uses Yammer and these tests fail for for {@link DropwizardMetricsFactory}
*/
@Test(enabled = false)
@Test(enabled = false) // enabled=false on class level doesn't seem to work in intellij
public class DropwizardBrokerPrometheusMetricsTest extends BrokerPrometheusMetricsTest {
@Override
protected PinotMetricsFactory getPinotMetricsFactory() {
Expand All @@ -40,4 +43,19 @@ protected String getConfigFile() {
//todo: return the correct dir once this test is enabled
return null;
}

@Test(dataProvider = "brokerGauges", enabled = false)
public void timerTest(BrokerTimer timer) {
super.timerTest(timer);
}

@Test(dataProvider = "brokerMeters", enabled = false)
public void meterTest(BrokerMeter meter) {
super.meterTest(meter);
}

@Test(dataProvider = "brokerGauges", enabled = false)
public void gaugeTest(BrokerGauge gauge) {
super.gaugeTest(gauge);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

package org.apache.pinot.common.metrics.prometheus.dropwizard;

import org.apache.pinot.common.metrics.ControllerGauge;
import org.apache.pinot.common.metrics.ControllerMeter;
import org.apache.pinot.common.metrics.ControllerTimer;
import org.apache.pinot.common.metrics.prometheus.ControllerPrometheusMetricsTest;
import org.apache.pinot.plugin.metrics.dropwizard.DropwizardMetricsFactory;
import org.apache.pinot.spi.annotations.metrics.PinotMetricsFactory;
Expand All @@ -28,7 +31,7 @@
/**
* Disabling tests as Pinot currently uses Yammer and these tests fail for for {@link DropwizardMetricsFactory}
*/
@Test(enabled = false)
@Test(enabled = false) // enabled=false on class level doesn't seem to work in intellij
public class DropwizardControllerPrometheusMetricsTest extends ControllerPrometheusMetricsTest {

@Override
Expand All @@ -41,4 +44,19 @@ protected String getConfigFile() {
//todo: return the correct dir once this test is enabled
return null;
}

@Test(dataProvider = "controllerTimers", enabled = false)
public void timerTest(ControllerTimer controllerTimer) {
super.timerTest(controllerTimer);
}

@Test(dataProvider = "controllerMeters", enabled = false)
public void meterTest(ControllerMeter meter) {
super.meterTest(meter);
}

@Test(dataProvider = "controllerGauges", enabled = false)
public void gaugeTest(ControllerGauge controllerGauge) {
super.gaugeTest(controllerGauge);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

package org.apache.pinot.common.metrics.prometheus.dropwizard;

import org.apache.pinot.common.metrics.MinionGauge;
import org.apache.pinot.common.metrics.MinionMeter;
import org.apache.pinot.common.metrics.MinionTimer;
import org.apache.pinot.common.metrics.prometheus.MinionPrometheusMetricsTest;
import org.apache.pinot.plugin.metrics.dropwizard.DropwizardMetricsFactory;
import org.apache.pinot.spi.annotations.metrics.PinotMetricsFactory;
Expand All @@ -28,7 +31,7 @@
/**
* Disabling tests as Pinot currently uses Yammer and these tests fail for for {@link DropwizardMetricsFactory}
*/
@Test(enabled = false)
@Test(enabled = false) // enabled=false on class level doesn't seem to work in intellij
public class DropwizardMinionPrometheusMetricsTest extends MinionPrometheusMetricsTest {

@Override
Expand All @@ -41,4 +44,19 @@ protected String getConfigFile() {
//todo: return the correct dir once this test is enabled
return null;
}

@Test(dataProvider = "minionTimers", enabled = false)
public void timerTest(MinionTimer timer) {
super.timerTest(timer);
}

@Test(dataProvider = "minionMeters", enabled = false)
public void meterTest(MinionMeter meter) {
super.meterTest(meter);
}

@Test(dataProvider = "minionGauges", enabled = false)
public void gaugeTest(MinionGauge gauge) {
super.gaugeTest(gauge);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

package org.apache.pinot.common.metrics.prometheus.dropwizard;

import org.apache.pinot.common.metrics.ServerGauge;
import org.apache.pinot.common.metrics.ServerMeter;
import org.apache.pinot.common.metrics.ServerTimer;
import org.apache.pinot.common.metrics.prometheus.ServerPrometheusMetricsTest;
import org.apache.pinot.plugin.metrics.dropwizard.DropwizardMetricsFactory;
import org.apache.pinot.plugin.metrics.yammer.YammerMetricsFactory;
Expand All @@ -29,7 +32,7 @@
/**
* Disabling tests as Pinot currently uses Yammer and these tests fail for for {@link DropwizardMetricsFactory}
*/
@Test(enabled = false)
@Test(enabled = false) // enabled=false on class level doesn't seem to work in intellij
public class DropwizardServerPrometheusMetricsTest extends ServerPrometheusMetricsTest {

@Override
Expand All @@ -42,4 +45,19 @@ protected String getConfigFile() {
//todo: return the correct dir once this test is enabled
return null;
}

@Test(dataProvider = "serverTimers", enabled = false)
public void timerTest(ServerTimer serverTimer) {
super.timerTest(serverTimer);
}

@Test(dataProvider = "serverMeters", enabled = false)
public void meterTest(ServerMeter serverMeter) {
super.meterTest(serverMeter);
}

@Test(dataProvider = "serverGauges", enabled = false)
public void gaugeTest(ServerGauge serverGauge) {
super.gaugeTest(serverGauge);
}
}
Loading

0 comments on commit 701cc1e

Please sign in to comment.