Comments (13)
Seems you have already converted all of them. Need any more help?
from solr-node-client.
Hi @juzerali ,
Yes a few things are still missing including few files already created with a mention //TODO
:
core-query-test.js
dismax-query-test.js
facet-query-test.js
group-query-test.js
mlt-query-test.js
These tests should cover all features exposed by Solr in their category even if there are not yet implemented in the current version of this client.
Next week-end I will have some time to continue this task in the same time feel completely free to code some of these tests :). Just let me know which tests you want to write and there are yours.
In the branch v0.3.x, I added a little roadmap in the README.md
, an overview of what I would like in v0.3.0 when releasing. The most important thing being a complete support of the features in Solr 4. :)
from solr-node-client.
Sticking with assert
instead of should
? Describe
pattern fits well with should
.
from solr-node-client.
I don't really know the pros and cons between these two styles but I find should
really verbose without giving really good value since I already describe what should be expected globally in the it
call. I find assert
really straightforward compare to should
and also assert is native in node, nice thing too is chai adds some flavors to this api. From my point of view assert
is as readable as should
without a chainable language ( assert.isNotString(x)
<=> x.should.not.be.a.('string')
). That's mainly the reasons why I stick with assert
.
from solr-node-client.
I am a novice nodejs developer, so I would take things really slowly. I started writing group-query-test
. I have written one test to understand certain ground rules. So far I have understood.
- We are essentially checking against
responseHeader
that Solr returns - No need to insert data into Solr to check
- Always check
sassert
before checking other results.
Can you please take a look at my first test and approve so that I can start writing other tests in similar fashion.
from solr-node-client.
/me (being sorry for pushing the wrong button)
from solr-node-client.
I've merged the old patch from @juzerali and tried to get the tests running.
I'm doing this in the branch: https://github.com/marc-portier/solr-node-client/tree/v0.3.x-patch39
The relevant commits are:
1| marc-portier@16a1819
current status is that tests succeed when running separately, but fail when running in one go.
Error comes up in the test/group-query-test.js and suddenly holds weird echo's to group.facet statements? Looks like the client has some memory of the old request lingering in the new one?
- Client#createQuery #group(options), callback) should create a group query:
Uncaught AssertionError: expected { Object (group.format, group.ngroups, ...) } to deeply equal { Object (group.format, group.ngroups, ...) }
+ expected - actual
{
"group": "true",
"group.cache.percent": "50",
+ "group.facet": "true",
"group.field": "title_t",
"group.format": "simple",
+ "group.func": "test",
"group.limit": "15",
"group.main": "true",
"group.ngroups": "true",
"group.offset": "8",
"group.sort": "score desc",
"group.truncate": "true",
+ "rows": "11",
+ "start": "1",
"wt": "json"
}
at Function.assert.deepEqual (/home/mpo/projects/solr-node-client.git/node_modules/chai/lib/chai/interface/assert.js:205:32)
at /home/mpo/projects/solr-node-client.git/test/group-query-test.js:60:12
at IncomingMessage.<anonymous> (/home/mpo/projects/solr-node-client.git/lib/solr.js:669:31)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:912:16
at process._tickCallback (node.js:415:13)
from solr-node-client.
My mistake: for some reason the group-query-test fails in this branch: also when ran individually.
Hadn't ran it individually before.
group-query-test was new and merged in from the previous pullreq #46
That file just didn't give a conflict so I forgot about it, so sorry for all this noise.
Will adapt our expectations to this test as well.
from solr-node-client.
@lbdremy I think I have this one covered with this set of patches:
https://github.com/marc-portier/solr-node-client/compare/marc-portier:v0.3.x-patch85...v0.3.x-patch39?expand=1 (diff calculated versus the earlier patch for #85 since it continuous from the configurable tests introduced there)
This includes:
I'll be waiting for #85 to land before presenting the pull-req for this.
from solr-node-client.
Alright that's great progress! :) we need to push a bit to get a better coverage, the current coverage report is https://rawgit.com/lbdremy/ca8304efdf3695d25767/raw/5f346ae0eb4cbc3cccdd883b95ff73971355af03/coverage.html
from solr-node-client.
Not too bad... Maybe best approach is to create separate issues for the tests we still need then? And close this off in v0.3.x ?
from solr-node-client.
Yep that's a great idea. I can create the issues tonight, I will add the label test
to them.
from solr-node-client.
The coverage is around 80% using mocha and chai, individual issues for missing tests are in the tracker, so closing this.
from solr-node-client.
Related Issues (20)
- Migrate to TypeScript
- Using dynamic `require` instead of `import` in tests hides typescript errors. HOT 3
- Wrap requests in promises when callback is not set HOT 2
- Update migration guide
- Replace callback-based API with promise-based async functions HOT 37
- Build Issue: 0.10.0-RC8 HOT 10
- Firefox: Uncaught TypeError: Error.captureStackTrace is not a function HOT 1
- UnhandledPromiseRejectionWarning Error HOT 16
- Question: TypeScript Declaration HOT 2
- Requesting an example to add options like SSL parameters (like ca, cert, key). HOT 4
- Undici library causes tests to fail in the browser (Karma).
- Do not require a port when making a connection HOT 5
- Update function fails: "msg":"Unknown command 'id' at [5]" HOT 1
- Uncaught exception when client.ping is called against unresponsive Solr instance
- { library: 'SSL routines', function: 'ssl3_get_record', reason: 'wrong version number', code: 'ERR_SSL_WRONG_VERSION_NUMBER' } Error HOT 1
- Ability to add other parameters like `debug` or `rows` HOT 1
- Support for Solr 9? HOT 3
- TS Export Errors HOT 1
- Any way to mitigate specific errors caused by some field ?
- Facing issue while connecting `solr-client` with Zookeeper for Solr-Cloud
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 solr-node-client.