Issue 4902 make unit tests use distribution