This is not gonna be great to track down. Conside...
# testing
a
This is not gonna be great to track down. Consider this test:
Copy code
it("fails if an exception is thrown", () => {
    expect(() => {throw "hi"}).notToThrow()
})
This should fail. On Lucee 5.3.7.48 it works fine. On Lucee 5.3.8.206 it doesn't work. IE: this test passes. It also passes if I use
toThrow
instead of
notToThrow
. I will try to track it back to a specific change in Lucee, but I suspect something woolly is going on in the TestBox code that makes it fragile. NB: that is just a distilled-down repro case. My actual case was with an expression that resulted in an exception, and I tried with various other expressions that caused exceptions. All behave the same:
toNotThrow
does not work. Ping @lmajano
It broken somewhere between the version of Lucee in the
5.3.8.3-SNAPSHOT
docker image (where it works fine), and the next one I could find on Dockerhub:
5.3.8.42-SNAPSHOT
(where it is broken). That's quite a jump there between minor versions (compared to granularity between other ones). I had a quick look-see at the differences in the source code between each, but didn't spot anything obvious (I did not spend too much time on it, cos there were a lot of changes between those two). The Jira tickets fixed between each of those versions don't shine any light either: https://luceeserver.atlassian.net/issues/?jql=fixversion%20%20%3E%3D%205.3.8.4%20and%20fixversion%20%3C%3D%205.3.8.42, but it would not surprise me if not every change to the source code has a matching ticket. I'm gonna see if I can just look at the TestBox code and see if I can track down the behaviour change that way.
Got it. It's a behaviour change in Lucee's regex handling. A bug in the implementation of https://luceeserver.atlassian.net/browse/LDEV-2156 or https://luceeserver.atlassian.net/browse/LDEV-3009, by the looks. Checking.
See update on Lucee channel. It's a Lucee bug: https://cfml.slack.com/archives/C06TA0A9W/p1650210205926539
b
This rings a bell, in fact I thought I remembered putting a fix into Testbox for this
Though it's possible I ran into it, intended to fix it, and got side tracked
I do recall at least ensuring there was a Lucee ticket.
a
I did look, but didn't find it. Although there was quite a gap between when I found it and when I worked out exactly what the story was, so maybe I searched before I knew what to look for, if you see what I mean.
b
Yeah, I'm having troubles finding the ticket too which is making me question my sanity 🤔
I swear it had to do with how the new regex engine matched an empty string
a
bingo.
Fixed in six. Not much help to me here.
b
Looks like Zac had already entered it which made all my frantic JIRA searching on reporter == brad useless 😆
Fixed in six. Not much help to me here.
Yeah, as a regression that seems like it should be in 5.3.9. @zackster?
a
I'll just keep my Lucee version pegged to something from 2020, back when it used to work 😉
b
We may want to see if there's a workaround we can do in Testbox in the mean time to work around this seeing as how we can cycle a testbox release on a much quicker turnaround than Lucee.