Remove testing hacks#1337
Remove testing hacks#1337samtstern merged 5 commits intofirebase:version-4.1.0-devfrom SUPERCILEX:tests
Conversation
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
| } catch (IllegalAccessException e) { | ||
| throw new IllegalStateException(e); | ||
| } catch (NullPointerException e) { | ||
| continue; // Instance field, move on |
There was a problem hiding this comment.
Lol, yeah. The more accurate title would be Remove testing hacks in production in favor of hacks in testing code.
|
@samtstern BTW, all 4.1 PRs are going to fail until #1329 is resolved. |
|
@SUPERCILEX are you sure this is better? It still relies on reflection that's likely to break one day. May not be any less of a hack than my half-assed dependency injection. |
|
Yeah, it's not great, but it moves the hacks to our tests instead of the production code. If you don't agree that that's better (I'm on the fence myself), I'll clean up your injection instead. 👍 |
|
If you have an idea to clean up the injection I'd be all for that instead! |
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
|
@samtstern Voila! Yeah, you're right, this is way better. Thanks! ❤️ |
|
@SUPERCILEX nice! |
This solution isn't great since it means we'll have to mock every
FirebaseAppmethod we use, but it gives us absolute control over every Firebase API.