Issues Running Tests in IntelliJ

Hi everyone,

I’m trying to contribute to questDB and I’m having trouble running the tests for QuestDB in IntelliJ. Despite following the contibuting guide, the tests keep failing.

These are the test results

Results :

Failed tests:
LogAlertSocketTest.testParseAlertTargetsBad:226->assertLogError:433->lambda$assertLogError$7:441 null
LineSenderBuilderTest.testDnsResolutionFail:589->AbstractCairoTest.assertMemoryLeak:953->AbstractCairoTest.assertMemoryLeak:970->AbstractCairoTest.lambda$assertMemoryLeak$8:973->lambda$testDnsResolutionFail$29:593 ‘[60] could not connect to host [host=this-domain-does-not-exist-i-hope-better-to-use-a-silly-tld.silly-tld]’ does not contain: could not resolve

Tests run: 16976, Failures: 2, Errors: 0, Skipped: 561

These are the specific tests which failed with errors

io.questdb.test.log.LogAlertSocketTest

Tests run: 15, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.121 sec <<< FAILURE! - in io.questdb.test.log.LogAlertSocketTest
testParseAlertTargetsBad(io.questdb.test.log.LogAlertSocketTest) Time elapsed: 0.071 sec <<< FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.fail(Assert.java:96)
at io.questdb.test.log.LogAlertSocketTest.lambda$assertLogError$7(LogAlertSocketTest.java:441)

io.questdb.test.client.LineSenderBuilderTest

Tests run: 57, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 75.684 sec <<< FAILURE! - in io.questdb.test.client.LineSenderBuilderTest
testDnsResolutionFail(io.questdb.test.client.LineSenderBuilderTest) Time elapsed: 75.069 sec <<< FAILURE!
java.lang.AssertionError: ‘[60] could not connect to host [host=this-domain-does-not-exist-i-hope-better-to-use-a-silly-tld.silly-tld]’ does not contain: could not resolve
at org.junit.Assert.fail(Assert.java:89)
at io.questdb.test.tools.TestUtils.assertContains(TestUtils.java:132)
at io.questdb.test.tools.TestUtils.assertContains(TestUtils.java:136)
at io.questdb.test.client.LineSenderBuilderTest.lambda$testDnsResolutionFail$29(LineSenderBuilderTest.java:593)

I’m using a Macbook m1 sonoma 14.0
Java 17
maven 3.9

I didn’t do any changes to the existing code. Any help would be appreciated.

Thank you.

Hi @sriram-V20 ,

Is this a consistent failure, or does it pass occassionally?

If it is an ocassional failure, we usually write up an issue and mark it with the Flaky Test tag. See here: Issues · questdb/questdb · GitHub

This is a consistent failure.

I’m able to run questDB locally with commands mentioned in the Contributing.md file but I’m not sure why the tests keep failing.