Testing/Debugging foxx and catching AqlErrors from AQB

68 views
Skip to first unread message

Julian May

unread,
Jan 6, 2016, 8:31:01 AM1/6/16
to ArangoDB



Hey

I'm probably just overlooking something, but:
It seems that AqlErrors (at least "Not a valid simple reference" ones) thrown by AQB does not act as a normal error (No stacktrace, not catched by 
This is a screenshot of my tests regarding a dynamic query, written with AQB:


The last test only has the statcktrace for the assertion-error ( expect(fn).to.throw(error) ), but here, the message of the AqlError is grabbed...

Nothing is written in the log (at least with log-level "info") - how should i go about debugging/handling these errors?

Thanks :)


Julian May

unread,
Jan 6, 2016, 8:48:20 AM1/6/16
to ArangoDB
Probably all AqlErrors... At least also "AqlError: Expected value to be a string:"

Alan Plum

unread,
Jan 11, 2016, 7:20:54 AM1/11/16
to ArangoDB
Hi Julian,

the problem seems to be that the error occurs in the test itself (rather than being a failed assertion).

I agree that it should still provide a sensible stacktrace in that case and will look into it.

Could you send me the test file that is showing this behaviour?


Cheers,

Alan

Julian May

unread,
Jan 11, 2016, 8:41:35 AM1/11/16
to ArangoDB
Hey Alan

Running tests via FoxxManager produces stacktraces for errors thrown by the system under test, so i managed to figure out the problem that way.
If you want it, i can go back in my git-repo and dig up the version acting like this, but it's probably easier for you to just write an invalid AQB query and a quick test that asserts the result (which is never produced) from this. 
That would recreate this scenario.
Let me know :)

/Julian

Alan Plum

unread,
Jan 14, 2016, 8:07:48 AM1/14/16
to ArangoDB
Hi Julian,

I've opened an issue to analyse this further:


Cheers,

Alan

Alan Plum

unread,
Jun 17, 2016, 9:32:14 AM6/17/16
to ArangoDB
Hi Julian,

does this issue still persist in the current versions of ArangoDB (2.8 and 3.0.0-rc2)?

Can you provide an example test case that shows this behaviour? I haven't had any success in reproducing the problem.

Cheers,

Alan
Reply all
Reply to author
Forward
0 new messages