Comments (5)
Hey @veeramarni!
Thanks for taking a look here!
Just to clarify as this test is in the current test suite that's passing.
If you run the whole test suite that works?
Could you maybe try uncommenting the code back and just use it.only in order to run the one test?
from graphql-redis-subscriptions.
Yes, basically with all tests it running fine. But the tests that I have pointed were failing. It could be just the test case that was having the issue.
from graphql-redis-subscriptions.
Hmm 🤔
Okay thanks for reporting this issue.
I'll try out when I have a bit more time for maintenance.
Do you see the issue when actually using asynciterator methods?
from graphql-redis-subscriptions.
I've noticed issues with the integration tests myself when working on #108 locally.
When running npm test
the Integration tests simply return the following
1) PubSubAsyncIterator should allow subscriptions:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
I noticed when submitting the PR that jenkins successfully ran those integration tests so wanted to give a bit more information on my environment in case that's relevant.
Node version: 8.9.1
Windows 10
Installation steps before running tests:
- git clone
- npm install
- npm test
from graphql-redis-subscriptions.
Possible cause:
const iterator = pubSub.asyncIterator(eventName);
The subscription takes some time. Even if the promises resolve immediately it waits for the next tick.
If the publish happens right after the call to asyncIterator the global listener is still undefined.
const publishSpy = spy((channel, message) => listener && listener(channel, message));
If all tests are running the reused global listener might already be set.
setTimeout(() => pubSub.publish(eventName, { test: true }), 0)
Should fix the tests but I'm not sure if that is the most elegant solution.
from graphql-redis-subscriptions.
Related Issues (20)
- Update ioredis HOT 1
- pub/sub type safety improvements
- Ability to dynamically add/remove topics to/from asyncIterator
- Fail to startup with IOREDIS v5.0.5 HOT 1
- When filtering on subscriptions, parameters are always undefined HOT 1
- ID of the payload returned by the subscription is always null | undefined HOT 1
- Getting Type 'Redis' is not assignable to type 'RedisClient' on v2.5.0 HOT 2
- issue with Redis , no construct
- Node Redis Support HOT 2
- pubsub.asyncIterator should return an AsyncIterable
- TS2322: Type 'Redis' is not assignable to type 'RedisClient'. HOT 6
- Support sharded pub/sub
- Error: Connection is closed. with pubsub HOT 1
- Race condition with simultaneous subscribe + quick unsubscribe HOT 9
- Please update Readme.md with required redis ACL perms for cluster HOT 1
- Callback when connection is closed?
- graphql-redis-subscriptions version 2.6.0 is not working with Node 16.0.0 HOT 1
- inside docker graphql-redis-subscriptions searches to connect to localhost HOT 2
- Simple example not working with ioredis 5 due to mismatched types HOT 1
- Weird bug since 2.6.1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-redis-subscriptions.