Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky TestPrometheusIntegrationStatus #7224

Closed
kokosing opened this issue Mar 8, 2021 · 3 comments · Fixed by #10778
Closed

Flaky TestPrometheusIntegrationStatus #7224

kokosing opened this issue Mar 8, 2021 · 3 comments · Fixed by #10778
Labels
bug Something isn't working test

Comments

@kokosing
Copy link
Member

kokosing commented Mar 8, 2021

2021-03-08T15:20:03.9011321Z [ERROR] testPushDown(io.trino.plugin.prometheus.TestPrometheusIntegrationStatus)  Time elapsed: 1.082 s  <<< FAILURE!
2021-03-08T15:20:03.9019429Z java.lang.AssertionError: expected [1] but found [2]
2021-03-08T15:20:03.9025167Z 	at org.testng.Assert.fail(Assert.java:94)
2021-03-08T15:20:03.9031490Z 	at org.testng.Assert.failNotEquals(Assert.java:513)
2021-03-08T15:20:03.9038117Z 	at org.testng.Assert.assertEqualsImpl(Assert.java:135)
2021-03-08T15:20:03.9044465Z 	at org.testng.Assert.assertEquals(Assert.java:116)
2021-03-08T15:20:03.9050460Z 	at org.testng.Assert.assertEquals(Assert.java:389)
2021-03-08T15:20:03.9058062Z 	at org.testng.Assert.assertEquals(Assert.java:399)
2021-03-08T15:20:03.9073867Z 	at io.trino.plugin.prometheus.TestPrometheusIntegrationStatus.testPushDown(TestPrometheusIntegrationStatus.java:105)
2021-03-08T15:20:03.9087700Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-03-08T15:20:03.9101487Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-03-08T15:20:03.9114944Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-03-08T15:20:03.9122900Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021-03-08T15:20:03.9132952Z 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
2021-03-08T15:20:03.9141695Z 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
2021-03-08T15:20:03.9150916Z 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
2021-03-08T15:20:03.9160411Z 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
2021-03-08T15:20:03.9170980Z 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
2021-03-08T15:20:03.9181383Z 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
2021-03-08T15:20:03.9211857Z 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2021-03-08T15:20:03.9227356Z 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2021-03-08T15:20:03.9235616Z 	at java.base/java.lang.Thread.run(Thread.java:834)
@ebyhr
Copy link
Member

ebyhr commented Jan 24, 2022

@ebyhr
Copy link
Member

ebyhr commented Jan 25, 2022

Faced another flaky issue when I was trying to reproduce locally.

java.lang.RuntimeException: line 1:22: Table 'prometheus.default.up' does not exist

	at io.trino.testing.AbstractTestingTrinoClient.execute(AbstractTestingTrinoClient.java:122)
	at io.trino.testing.DistributedQueryRunner.execute(DistributedQueryRunner.java:505)
	at io.trino.testing.AbstractTestQueryFramework.computeActual(AbstractTestQueryFramework.java:139)
	at io.trino.testing.AbstractTestQueryFramework.computeActual(AbstractTestQueryFramework.java:134)
	at io.trino.plugin.prometheus.TestPrometheusIntegrationStatus.testPushDown(TestPrometheusIntegrationStatus.java:111)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.privateRun(TestRunner.java:756)
	at org.testng.TestRunner.run(TestRunner.java:610)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
	at org.testng.TestNG.runSuites(TestNG.java:1133)
	at org.testng.TestNG.run(TestNG.java:1104)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
	Suppressed: java.lang.Exception: SQL: SELECT now(), * FROM prometheus.default.up WHERE timestamp > (NOW() - INTERVAL '15' SECOND)
		at io.trino.testing.DistributedQueryRunner.execute(DistributedQueryRunner.java:508)
		... 27 more
Caused by: io.trino.spi.TrinoException: line 1:22: Table 'prometheus.default.up' does not exist
	at io.trino.sql.analyzer.SemanticExceptions.semanticException(SemanticExceptions.java:48)
	at io.trino.sql.analyzer.SemanticExceptions.semanticException(SemanticExceptions.java:43)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:1520)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:404)
	at io.trino.sql.tree.Table.accept(Table.java:60)
	at io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:421)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.analyzeFrom(StatementAnalyzer.java:3405)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:2144)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:404)
	at io.trino.sql.tree.QuerySpecification.accept(QuerySpecification.java:155)
	at io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:421)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:429)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:1347)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:404)
	at io.trino.sql.tree.Query.accept(Query.java:107)
	at io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)
	at io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:421)
	at io.trino.sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:384)
	at io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:79)
	at io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:71)
	at io.trino.execution.SqlQueryExecution.analyze(SqlQueryExecution.java:254)
	at io.trino.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:179)
	at io.trino.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:776)
	at io.trino.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(LocalDispatchQueryFactory.java:132)
	at io.trino.$gen.Trino_testversion____20220125_060823_3.call(Unknown Source)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

@ebyhr
Copy link
Member

ebyhr commented Jan 25, 2022

The period in Prometheus might be shorter than 15s (2nd - 1st = 14.965s), so the current assertion returns 2 rows in this case.

                         labels                         |           timestamp            | value
--------------------------------------------------------+--------------------------------+-------
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:15:57.064 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:16:12.029 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:16:27.030 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:16:41.997 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:16:56.997 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:17:11.962 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:17:26.961 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:17:41.926 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:17:56.925 +09:00 |   1.0
 {instance=localhost:9090, __name__=up, job=prometheus} | 2022-01-25 15:18:11.890 +09:00 |   1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test
Development

Successfully merging a pull request may close this issue.

2 participants