@@ -25,7 +25,6 @@ import kotlinx.coroutines.delay
2525import kotlinx.coroutines.runBlocking
2626import org.junit.jupiter.api.Assertions.assertEquals
2727import org.junit.jupiter.api.Assertions.assertNotNull
28- import org.junit.jupiter.api.Disabled
2928import org.junit.jupiter.api.Test
3029import spp.protocol.instrument.LiveMeter
3130import spp.protocol.instrument.location.LiveSourceLocation
@@ -36,16 +35,20 @@ import spp.protocol.view.LiveViewEvent
3635import spp.protocol.view.rule.RulePartition
3736import spp.protocol.view.rule.ViewRule
3837
39- @Disabled // todo: this test is flaky
4038class MeterPartitionTest : ProbeIntegrationTest () {
4139
4240 @Suppress(" UNUSED_VARIABLE" )
4341 private fun doTest (index : Int ) {
4442 var i = index % 2 == 0
43+ addLineLabel(" done" ) { Throwable ().stackTrace[0 ].lineNumber }
4544 }
4645
4746 @Test
4847 fun `test meter partitions` (): Unit = runBlocking {
48+ setupLineLabels {
49+ doTest(- 1 )
50+ }
51+
4952 val liveMeter = LiveMeter (
5053 MeterType .COUNT ,
5154 MetricValue (MetricValueType .NUMBER , " 1" ),
@@ -58,7 +61,7 @@ class MeterPartitionTest : ProbeIntegrationTest() {
5861 meta = mapOf (" metric.mode" to " RATE" ),
5962 location = LiveSourceLocation (
6063 MeterPartitionTest ::class .java.name,
61- 43 ,
64+ getLineNumber( " done " ) ,
6265 " spp-test-probe"
6366 ),
6467 id = testNameAsUniqueInstrumentId,
0 commit comments