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

Fixed getExecutionPlanDescription on compiled results #11332

Merged
merged 3 commits into from
Mar 28, 2018
Merged

Fixed getExecutionPlanDescription on compiled results #11332

merged 3 commits into from
Mar 28, 2018

Conversation

SaschaPeukert
Copy link
Contributor

No description provided.

val runtime = CompiledRuntimeOption.name
val description1 = executeQueryAndGetExecutionPlanDescription(query, runtime, false)
val description2 = executeQueryAndGetExecutionPlanDescription(query, runtime, true)
Assert.assertEquals(description1, description2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we using JUnit asserts in scala?

Copy link
Contributor

@pontusmelke pontusmelke left a comment

Choose a reason for hiding this comment

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

Just some small things


val description1 = executeQueryAndGetExecutionPlanDescription(query, runtime, false)
val description2 = executeQueryAndGetExecutionPlanDescription(query, runtime, true)
assert(description1.equals(description2))
Copy link
Contributor

Choose a reason for hiding this comment

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

We usually prefer

description1 should equal(description2)


val description1 = executeQueryAndGetExecutionPlanDescription(query, runtime, false)
val description2 = executeQueryAndGetExecutionPlanDescription(query, runtime, true)
assert(description1.equals(description2))
Copy link
Contributor

Choose a reason for hiding this comment

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

same here use a should equal(b) instead

val executedQuery = "CYPHER runtime = " + runtime + " " + query
val result: Result = graph.execute(executedQuery)
if (iterateOverResult)
assert("empty iterator".equals(result.toString)) // don't really care for the assertion, just consume the results
Copy link
Contributor

Choose a reason for hiding this comment

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

result.hasNext should be false

@SaschaPeukert SaschaPeukert merged commit 66bf65c into neo4j:3.4 Mar 28, 2018
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.

3 participants