Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid issues with fallback registry caching.
The way we are hooking into the application instance registry ultimately means that we leak "factories". Once the first test resolves a factory for a given name, **all other tests** will use that factory (even if `setResolverRegistry` were called again with a different value!1!1!1!1). This works around the immediate issue by always using the "current" assert object instead of the closure scoped one because all of the tests will use the same factory, and using `assert` from the first test will cause many issues for subsequent tests. In the long run, we need to fix this in a different way. Most likely that means changing the way setResolverRegistry works to do something like: * hooking into the shared application instance * calling unregister and reregister for each key in the pojo provided Alternatively, we could recreate the registry instance itself (therefore flushing any caches). I think either would work, but am not certain how hard to implement...
- Loading branch information