Skip to content

Redis integration tests have side effects #1553

@jjbayer

Description

@jjbayer

How do you use Sentry?

Self-hosted/on-premise

Version

1.9.2

Steps to Reproduce

While working on #1543, I noticed the following:

  1. Checked out sentry-sdk for development.
  2. Installed redis:
    fakeredis==1.9.0
    redis==3.5.3
    redis-py-cluster==2.1.3
    
  3. Run redis integration tests twice, in different order:
    # first rediscluster, then redis
    pytest 'tests/integrations/rediscluster/test_rediscluster.py::test_rediscluster_basic[RedisCluster]' tests/integrations/redis/test_redis.py::test_basic
    # first redis, then rediscluster
    pytest tests/integrations/redis/test_redis.py::test_basic 'tests/integrations/rediscluster/test_rediscluster.py::test_rediscluster_basic[RedisCluster]'
    

Expected Result

Both test runs pass.

Actual Result

The second test run

pytest tests/integrations/redis/test_redis.py::test_basic 'tests/integrations/rediscluster/test_rediscluster.py::test_rediscluster_basic[RedisCluster]' 

fails with

tests/integrations/redis/test_redis.py .                                                                                                                                                                                                                                                    [ 50%]
tests/integrations/rediscluster/test_rediscluster.py F                                                                                                                                                                                                                                      [100%]

============================================================================================================================================ FAILURES =============================================================================================================================================
______________________________________________________________________________________________________________________________ test_rediscluster_basic[RedisCluster] ______________________________________________________________________________________________________________________________
tests/integrations/rediscluster/test_rediscluster.py:29: in test_rediscluster_basic
    (crumb,) = event["breadcrumbs"]["values"]
E   ValueError: not enough values to unpack (expected 1, got 0)

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions