File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
tests/integration/simulacron Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ unittest2
7
7
pytz
8
8
sure
9
9
pure-sasl
10
- twisted[tls]==19.2.1
10
+ twisted; python_version >= '3.5'
11
+ twisted[tls]==19.2.1; python_version < '3.5'
11
12
gevent>=1.0
12
13
eventlet
13
14
cython>=0.20,<0.30
Original file line number Diff line number Diff line change 27
27
@total_ordering
28
28
class AddressEndPoint (EndPoint ):
29
29
30
- def __init__ (self , address ):
30
+ def __init__ (self , address , port = 9042 ):
31
31
self ._address = address
32
+ self ._port = port
32
33
33
34
@property
34
35
def address (self ):
35
36
return self ._address
36
37
37
38
@property
38
39
def port (self ):
39
- return None
40
+ return self . _port
40
41
41
42
def resolve (self ):
42
- return self ._address , 9042 # connection purpose
43
+ return self ._address , self . _port # connection purpose
43
44
44
45
def __eq__ (self , other ):
45
46
return isinstance (other , AddressEndPoint ) and \
46
- self .address == other .address
47
+ self .address == other .address
47
48
48
49
def __hash__ (self ):
49
50
return hash (self .address )
@@ -99,7 +100,8 @@ def test_custom_endpoint(self):
99
100
cluster = Cluster (
100
101
contact_points = [AddressEndPoint ('127.0.0.1' )],
101
102
protocol_version = PROTOCOL_VERSION ,
102
- endpoint_factory = AddressEndPointFactory ()
103
+ endpoint_factory = AddressEndPointFactory (),
104
+ compression = False ,
103
105
)
104
106
cluster .connect (wait_for_all_pools = True )
105
107
You can’t perform that action at this time.
0 commit comments