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-test: SqliteJdbcSinkTest.tearDown #17713

Closed
1 of 2 tasks
lhotari opened this issue Sep 19, 2022 · 2 comments · Fixed by #17849
Closed
1 of 2 tasks

Flaky-test: SqliteJdbcSinkTest.tearDown #17713

lhotari opened this issue Sep 19, 2022 · 2 comments · Fixed by #17849

Comments

@lhotari
Copy link
Member

lhotari commented Sep 19, 2022

Search before asking

  • I searched in the issues and found nothing similar.

Example failure

https://github.com/apache/pulsar/actions/runs/3069039857/jobs/4977568132#step:10:4694

Exception stacktrace

  Error:  Tests run: 19, Failures: 1, Errors: 0, Skipped: 11, Time elapsed: 4.036 s <<< FAILURE! - in org.apache.pulsar.io.jdbc.SqliteJdbcSinkTest
  Error:  tearDown(org.apache.pulsar.io.jdbc.SqliteJdbcSinkTest)  Time elapsed: 0.11 s  <<< FAILURE!
  org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (cannot commit - no transaction is active)
  	at org.sqlite.core.DB.newSQLException(DB.java:1030)
  	at org.sqlite.core.DB.newSQLException(DB.java:1042)
  	at org.sqlite.core.DB.throwex(DB.java:1007)
  	at org.sqlite.core.DB.exec(DB.java:178)
  	at org.sqlite.SQLiteConnection.commit(SQLiteConnection.java:421)
  	at org.apache.pulsar.io.jdbc.JdbcAbstractSink.close(JdbcAbstractSink.java:141)
  	at org.apache.pulsar.io.jdbc.SqliteJdbcSinkTest.tearDown(SqliteJdbcSinkTest.java:122)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
  	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
  	at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
  	at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
  	at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:701)
  	at org.testng.internal.TestInvoker.runAfterGroupsConfigurations(TestInvoker.java:677)
  	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:661)
  	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
  	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
  	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
  	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
  	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
  	at org.testng.TestRunner.privateRun(TestRunner.java:764)
  	at org.testng.TestRunner.run(TestRunner.java:585)
  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
  	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
  	at org.testng.TestNG.runSuites(TestNG.java:1069)
  	at org.testng.TestNG.run(TestNG.java:1037)
  	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
  	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112)
  	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeLazy(TestNGDirectoryTestSuite.java:123)
  	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:90)
  	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
  	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
  	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
  	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
  	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@poorbarcode
Copy link
Contributor

@tisonkun
Copy link
Member

I'm working for a patch now.

tisonkun added a commit to tisonkun/pulsar that referenced this issue Sep 27, 2022
lhotari pushed a commit that referenced this issue Sep 28, 2022
* fix: delete sqlite files after jdbc connection closed

This closes #17713.

Signed-off-by: tison <[email protected]>

* uses isolated db file

Signed-off-by: tison <[email protected]>

* Revert "uses isolated db file"

This reverts commit 295db3c.

* close in order

Signed-off-by: tison <[email protected]>

* strong order guarantee

Signed-off-by: tison <[email protected]>

* factor out defer logic to avoid further bugs

Signed-off-by: tison <[email protected]>

* Revert "factor out defer logic to avoid further bugs"

This reverts commit f7f4634.

* Revert "strong order guarantee"

This reverts commit 747086f.

* use awaitTermination

Signed-off-by: tison <[email protected]>

Signed-off-by: tison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants