loopbackio / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
79 stars 56 forks source link

Add tests to verify underlying driver's compatibility with CLS #46

Open pulkitsinghal opened 8 years ago

pulkitsinghal commented 8 years ago
  1. LoopBack uses https://github.com/othiym23/node-continuation-local-storage for implicit context propagation across the async invocation paths.
  2. It has been speculated that ... some of the drivers (especially the ones with connection pooling) are not friendly with CLS
  3. CLS seems tricky because I've even seen comments that despite fixing the previous problem there maybe other undiscovered issues

So some robust testing is in order here.

Adding a test that somehow manages to use the CLS feature should help verify both the stability of the connector and the underlying elasticsearch driver.

After the test is ready, we should be mindful to use it such that we really hit the connector hard (like something such as apache ab would do) and verify the responses to make sure the data didn't get mixed up.