Push Server + Google stuff
by Lucas Holmquist
currently to create an Android variant, we supply the google api key. i'm wondering if we should also supply the "Project Number". I know with the Cordova Push Plugin, this is needed. i guess this would be more for having all the things that you need to copy and paste in one place,
thoughts?
-Luke
11 years, 5 months
AeroGear Android 1.1.0 on Staging
by Bruno Oliveira
Good morning slackland.
I'm pleased to announce that AeroGear Android 1.1.0 was staged on Nexus.
You are probably anxious to test it so don't hold your breath and add
the staging repository into your Maven profile:
https://repository.jboss.org/nexus/content/repositories/jboss_releases_st...
Kudos to our fearless droids Summers and Passos. Some gifts into this
package:
- Changelog
* Typo
* Merge branch 'secondsun/AGDROID_40'
* Updating AeroGear authentication module
* remove unused method
* fixing visibility on the TAG field
* Merge branch 'javadocfix'
* Fixing up Javadoc Warnings
* Added gen-external-apklibs on .gitignore
* Added travis-ci status
* Merge branch 'multipart' of
https://github.com/aerogear/aerogear-android
* Adding Multipart tests and moving values into a constant.
* Removing redundant public from interface methods
* Merge branch 'digest'
* Fixing onLogout
* Fixing breaking tests
* Adding a previously removed constructor
* autoformat source
* Autoformat Licenses
* Fixing a typo
* Adding byte array methods to support file uploads
* Removed where in readFilter url
* Restoring a method I accidentally removed.
* Removing deprecated methods in tests
* Removing internal uses of deprecated APIs and fixing warnings
* Organizing Imports
* AutoFormat
* Autoformat license
* Adding byte array methods to support file uploads
* Removed where in readFilter url
* cleaned up imports
* Added a test
* Fixed a bug
* Adding licenses
* Adding licenses
* Adding an explicit platform back in. Otherwise build won't work in
newer versions of the plugin/sdk
* Adding in a method Fix this up with previous commit
* Fixing a glitch
* initial multipart impl. Needs tests
* Adding byte array methods to support file uploads
* Adding Content Type Property
* Multipart builder
* Fix imports
* normalize license headers
* remove junk header
* Adding tests and fixing implementations
* Adding ResponseParser classes
* implementing RequestBuilder with GsonRequestBuilder
* Adding RequestBuilder
* Adding requestBuilder property
* Mark GsonBuilder methods deprecated
* Merge branch 'digest'
* Fix JavaDocs references
* Adding in more touches to digest and updating broken tests
* Fixup
* Adding methods for better authfields and almost finished with digets
* Fixup later
* Refactoring Parser to correctly handle multivalue qop
* Adding Digest Support, fixup later
* Adding Digest Header Parser
* Adding Headers to HttpException
* HttpRestProvider now correctly combines multivalue headers into a
comma delimited String
* Adding Headers to HttpException
* Extracting Authentication Module Runner for Digest
* fixup this commit later
* Extracting Authentication Module Runner for Digest
* Adding retryLogin method to AuthenticationModule and subclasses
* Adding Digest Module
* Merge branch 'parent_pom'
* bump to the maven central version
* remove plugins provided by the parent pom
* add aerogear-parent pom
* Added irc notification on travis
* Merge branch 'travis_ci' of
https://github.com/danielpassos/aerogear-android
* Update Android Plataform from 16 to 17 on travis
* Added google-play-services instalation on travis
* Merge branch 'AGDROID-6'
* Fixing Wrong JavaDoc
* removing references to readWithFilter from Javadocs
* Removing calls to depricated readWithFilter Method
* Fixing Wrong javadoc
* Removing unused class
* AGDROID-6 Reprecating ReadWithFilter and adding Read
Congrats and don't be afraid to beardslap Summers or Passos, if you find
some bug. The BUTTON will be pressed today after some coordination with
them.
--
abstractj
11 years, 5 months
Making testing PRs review faster
by Karel Piwko
Heya,
while developing tests, we often fix something in one PR while we hit the same
problem while different PR is developed. I'm not sure whether it's temporary
situation or not, but right now we need a faster occurrence of PRs in master.
That said, I really like "reviewers required" model used in Aerogear. So I was
thinking of making a "mirror" of aerogear master (either branch or separate
repository), where I could do the PR review, merge and later PR the master
for review in bigger chunks. I'd like to avoid separating code and itests if
possible, as this makes writing white tests a pita.
How does it sound to you? Any comments/suggestions welcomed.
Thanks,
Karel
11 years, 5 months
[openshift] WebSocket port info
by Daniel Bevenius
Hi,
just wanted to update about a WebSocket fix that concerns AS7 applications
on OpenShift. There was recently been a fix [1] that now enables WebSocket.
T
The server side application should listen to the WebSocket port, *8676*,
configured in standalone.xml.
The client application should connect using port *8000*. This might not be
obvious and is really the reason for this post.
cheers,
/Dan
[1] https://bugzilla.redhat.com/show_bug.cgi?id=984748
11 years, 5 months
Unified Push Server - GCM Push Notification Sender test
by Apostolos Emmanouilidis
Hi all,
I've managed to write an integration test which verifies that the
correct GCM notifications are sent to the GCM server when using the
selective send method.
The approach is the following:
- I have an Arquillian test which is executed inside the container.
The reason for executing the test inside the container is that I want to
access the application scoped GCMCache [1]
- The PushApplication, Android Variant and Android installations
registrations are performed outside the container
- When creating the WAR which is finally deployed from Arquillian, the
whole jar containing the GCM dependencies is removed and a custom GCM
Sender is added to the classpath
- The custom GCM Sender is defined as ApplicationScoped and it
contains some static fields. These static fields are instantiated when
the send method is called. e.g there is a static list which is filled
with the android token ids
- There is a test which is executed inside the container, accesses
the CGMCache, retrieves the custom Sender from the cache and uses the
Awaitility framework [2] in order to wait until the notifications are
sent
The code looks like the following:
def "verify that Push were sent to the correct devices"() {
expect:
Awaitility.await().atMost(Duration.FIVE_SECONDS).until(
new Callable<Boolean>() {
public Boolean call() throws Exception {
return
cache.getSenderForAPIKey(ANDROID_VARIANT_GOOGLE_KEY).regIdsList != null
&&
cache.getSenderForAPIKey(ANDROID_VARIANT_GOOGLE_KEY).regIdsList.size()
== 2; // The condition that must be fulfilled
}
}
);
cache.getSenderForAPIKey(ANDROID_VARIANT_GOOGLE_KEY).regIdsList.size()
== 2 &&
cache.getSenderForAPIKey(ANDROID_VARIANT_GOOGLE_KEY).regIdsList.contains(ANDROID_DEVICE_TOKEN_2) && Sender.regIdsList.contains(ANDROID_DEVICE_TOKEN)
}
Even if this everything works perfectly using this approach, I'm not
sure if the specific test should be included in the upstream. Having 2
GCM Sender classes in the project might confuse the end users. Wdyt? If
anyone has to propose a more elegant way to verify that the correct
notifications are sent plz tell me.
[1]:
https://github.com/aerogear/aerogear-unified-push-server/blob/master/src/...
[2]: http://code.google.com/p/awaitility/
11 years, 5 months
To Groovy or not to Groovy in integration tests
by Karel Piwko
Hi,
let me summarize the discussion from previous threads:
What were testing requirements?
* Do not mock
* Cover both backend and frontend testing at the same time
* Control test env from tests/Maven, so it runs on both CI and local machine
without any setup required
=> Those 3 requirements limited us to use Arquillian
* Cover unified push server specifications in readable way
Why Groovy instead of Java?
+ Better support for JSON
+ Spock provides very nice BDD support
+ Still supports anything Java would do
What problems we faced with Groovy?
- Needs specific compiler - solved, configured for tests only
- Needs support in IDE - Intellij - ootb, Eclipse and NetBeans have
plugins
- Needs to be deployed in test deployment - not addressed now, prolongs test
execution by few seconds per deployment
What are currently raised concerns?
- Different language for development and testing
- Raises bar for newcomers willing to write tests
Thank you for additional advantages, concerns or proving some of those are not
valid.
Karel
11 years, 5 months