DiceDB / dice

DiceDB is hyper-optimized for building and scaling truly real-time applications on modern hardware. It is a drop-in replacement for Redis with support for SQL-based reactivity.
https://dicedb.io/
Other
3.32k stars 420 forks source link

Unable to run tests for Dice DB by following the readme guide #132

Closed yashs360 closed 2 months ago

yashs360 commented 2 months ago

I am unable to run Dice DB tests via the commands documented in the README and the Dev Setup guide.

How to reproduce

cd dice

go test ./...

go test ./...
?       github.com/dicedb/dice    [no test files]
?       github.com/dicedb/dice/config    [no test files]
?       github.com/dicedb/dice/core/iomultiplexer    [no test files]
?       github.com/dicedb/dice/server    [no test files]
?       github.com/dicedb/dice/storm/set    [no test files]
?       github.com/dicedb/dice/testutils    [no test files]
2024/07/07 22:42:30 possible cross protocol scripting attack detected. dropping the request.
--- FAIL: TestGetOrCreateBloomFilter (0.00s)
    bloom_test.go:135: nil or wrong error while fetching non existing bloom filter - key: bf1, opts: &{errorRate:0.01 capacity:1024 bits:0 hashFns:[] bpe:0 indexes:[]}, err: <nil>
FAIL
FAIL    github.com/dicedb/dice/core    0.299s
ok      github.com/dicedb/dice/core/dencoding    (cached)
2024/07/07 22:42:30 starting an asynchronous TCP server on 0.0.0.0 8379
panic: test timed out after 10m0s

Expected behavior

Expecting the tests to run as mentioned in the docs

yashs360 commented 2 months ago

I believe @arpitbbhayani just addressed this. I will try out the new instructions. https://github.com/DiceDB/dice/pull/131/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R64

arpitbbhayani commented 2 months ago

@yashs360 The issue still persists. I am able to replicate the issue locally. With my latest changes, I made the setup simpler and more consistent across all tests.

yashs360 commented 2 months ago

I am facing 2 issues -

  1. Bloom filter fails, i think it might be flakey
  2. Starting webserver just hangs and times out after a few mins I am also debugging meanwhile.
yashs360 commented 2 months ago

TestGetOrCreateBloomFilter is flakey. Passes if run independently via TEST_FUNC=TestGetOrCreateBloomFilter make unittest-one but fails when we run via the whole suite make unittest . Wondering if some bad state is causing this?

yashs360 commented 2 months ago

Issue resolved by change ⬆️