dartist / redis_client

A high-performance async/non-blocking Redis client for Dart
BSD 2-Clause "Simplified" License
100 stars 29 forks source link

basic pub sub support #44

Closed tomaszkubacki closed 10 years ago

tomaszkubacki commented 10 years ago

I badly need this feature now but not sure if this is how you would like it to be implemented - please review.

bbss commented 10 years ago

Looks good to me as I can run your tests in isolation.

However I notice a problem when running all tests, but further investigation shows me it is not due to your changes, as the master broke which I somehow had not noticed before. Changed for me is that I am now on a mac and not on windows and on the latest Redis (2.8.4) build.

I ran all tests, in one of the tests I got a one of the async expectations fulfilled with the wrong future (I think, but can't reproduce..). This could have to do with issue #42 but as I run the test in solo_test and get a timeout (like with issue 42), after this running all tests will not give me the same error as before, so solo_testing changed the results of the tests for me, I am thoroughly confused.

I will merge this and if you (@tomaszkubacki) need me to publish to pub will do so but I leave you with the question: can you run all the tests?

tomaszkubacki commented 10 years ago

Hi,

Hmm that's strange - when I run test independently they all pass but simply running all_test (by run in IDE/ Ubuntu 64bit Redis 2.6.13) I got following error:

unittest-suite-wait-for-done Uncaught Error: Expected: '16.800000000000001' Actual: '16.8' Which: is different. Both strings start the same, but the given value is missing the following trailing characters: 0000000000 ...

Unhandled exception: Expected: '16.800000000000001' Actual: '16.8' Which: is different. Both strings start the same, but the given value is missing the following trailing characters: 0000000000 ...

0 _rootHandleUncaughtError..

(dart:async/zone.dart:677)

1 _asyncRunCallback (dart:async/schedule_microtask.dart:18)

2 _asyncRunCallback (dart:async/schedule_microtask.dart:21)

3 _RawReceivePortImpl._handleMessage

(dart:isolate-patch/isolate_patch.dart:119) Stack Trace:

0 SimpleConfiguration.onExpectFailure

(package:unittest/src/simple_configuration.dart:137:7)

1 _ExpectFailureHandler.fail

(package:unittest/src/simple_configuration.dart:15:28)

2 DefaultFailureHandler.failMatch

(package:unittest/src/expect.dart:117:9)

3 expect (package:unittest/src/expect.dart:75:29)

4 main...<anonymous

closure>. (file:///home/tomek/projects/redis_client/test/redis_client_tests.dart:394:43)

5 _Future._propagateToListeners.

(dart:async/future_impl.dart:453)

6 _rootRun (dart:async/zone.dart:683)

7 _RootZone.run (dart:async/zone.dart:832)

8 _Future._propagateToListeners (dart:async/future_impl.dart:445)

9 _Future._complete (dart:async/future_impl.dart:303)

10 _Future._asyncComplete.

(dart:async/future_impl.dart:354)

11 _asyncRunCallback (dart:async/schedule_microtask.dart:18)

12 _RawReceivePortImpl._handleMessage

(dart:isolate-patch/isolate_patch.dart:119)

himulawang commented 10 years ago

@tomaszkubacki I got the same output when run all the tests.

Ubuntu 64 bit Redis 2.8.3.

I look into the Socket layer. Find some responses are missing in transformer. But don't know why.

ref: https://github.com/dartist/redis_client/issues/42