Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix order of query results #1364

Merged
merged 1 commit into from
May 1, 2017
Merged

Fix order of query results #1364

merged 1 commit into from
May 1, 2017

Conversation

loay
Copy link
Contributor

@loay loay commented May 1, 2017

Description

The order of the instances in the array could be reverted sometimes. That's is causing CI failures sometimes.
so users[0].name could be 'John Lennon' or Paul McCartney' and the same for users[1].name,
so the fix is trying to ignore the order of names but to ensure that both names are still there.

@@ -341,8 +341,8 @@ describe('basic-querying', function() {
should.not.exist(err);
should.exist(users);
users.should.have.property('length', 2);
users[0].name.should.equal('John Lennon');
users[1].name.should.equal('Paul McCartney');
should(users[0].name).be.oneOf('John Lennon', 'Paul McCartney');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we don't care about the order, would have.members be a better option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing.. there are different ways of doing it.

@kjdelisle kjdelisle merged commit 6342a03 into master May 1, 2017
@kjdelisle kjdelisle deleted the query-order branch May 1, 2017 21:21
@kjdelisle
Copy link
Contributor

Force-merged due to unrelated grpc failure hanging this one up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants