codingteam / horta-hell

Configurable XMPP bot written in Scala based on the Akka framework.
MIT License
15 stars 8 forks source link

Pet opt-in #402

Closed ForNeVeR closed 8 years ago

ForNeVeR commented 8 years ago

After this change, horta administrator will have to explicitly enable pet for the rooms where he wants to use it.

That's actually a breaking change, but we're still in major version 0, so we're allowed to make such changes without incrementing the major version.

Closes #400.

ForNeVeR commented 8 years ago

I need to investigate the failing tests. According to my current experiments, they are failing seemingly at random. Will report back after the investigation.

hagane commented 8 years ago

I know that failing test. It's failing because it has a seemingly arbitrary timeout. You can safely ignore it or, if you're serious about it, set it to not run in parallel with other test suites.

hagane commented 8 years ago

The test you added -- the one in PetPluginSpec -- looks genuinely broken, though.

ForNeVeR commented 8 years ago

Got it. Our static configuration is not the best candidate to be mocked during the unit tests. The problem is it gets configured only once per all the tests, and the resulting configuration is baked into static Configuration.properties object first time it's accessed.

I'll add some logic to globally deinitialize it for now, but we'll need to invent something more testable in the future (so we could replace or mock that configuration object on a per-plugin basis). Will file an issue for that.

ForNeVeR commented 8 years ago

Ah, I've just added these lines to the global config. It was the easiest way.

rexim commented 8 years ago

This is pretty good shit! I like it! Approved.

ForNeVeR commented 8 years ago

Thanks all. Will merge and release the new version soon.