realtalk403/realtalkserver — pull request #31 by colinkho (2013-05-15 09:34:57+00:00)
Title: GCM + Testing Framework

This is a commit that implements GCM to work with the server. This will not break the server in any way even if it fails. As i was unable to fully test this, GCM sends its multicast messages in a new thread. So I'm unsure if heroku/maven supports this. Otherwise it should work fine.

Added:
GCMSendMessages.java : sends multicast messages
HelloWorldTest.java dummy class that provides an example of how to write a test for maven

Modified:
pom.xml: added plugins and dependencies to support testing during build
PostMessagesServlet.java: sends a multicast message through utility method when it receives a new message.
APIKeyInitializer.java: loads the api key needed for gcm

Removed:
Datastore.java: dont need it

Note:
Testing framework is up. To write tests, simply add normal JUnit 4 tests to the src/test/java directory. If you want to create new directory for specific tests, it is fine as long as its under this directory. Push it to heroku to run the tests or run a 'mvn test' if you have maven installed on your system. Probably easier to use heroku.

This release also includes Jory's latest commit

SubmittedBy: colinkho