The attached unit test shows that when "velocimacro.permissions.allow.inline.local.scope" is set to true, and multiple threads use the same VelocityEngine instance then macros sometimes don't get expanded and the #macroname call remains in the output text.
- running test method "testMultipleEvals" (single threaded case) always succeeds
- running test method "testMultiThreadMultipleEvals" always fails
- commenting out the allow.inline.local.scope line makes the multithread test pass (but of course has other side-effects)
Interestingly, for the multithread case it seems that 1 thread always succeeds and N-1 threads fail.