couchbaselabs/TouchDB-Android — pull request #98 by cesine (2013-05-08 23:12:01+00:00)
Title: Tests for non-trivial assignments

@tleyden here are some tests for non-trivial attachments which you might want if you are working on the replicator branch. This is just modifications to the test app, not to the codebase.

Example error when replicating a doc with 5 representative pictures created by an Android:
```java
05-09 05:57:23.153: E/AndroidRuntime(26586): FATAL EXCEPTION: HandlerThread for com.couchbase.touchdb.TDDatabase[/data/data/com.couchbase.touchdb.testapp/files/touchdb-test.touchdb]
05-09 05:57:23.153: E/AndroidRuntime(26586): java.lang.OutOfMemoryError
05-09 05:57:23.153: E/AndroidRuntime(26586):	at org.codehaus.jackson.util.ByteArrayBuilder._allocMore(ByteArrayBuilder.java:289)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at org.codehaus.jackson.util.ByteArrayBuilder.write(ByteArrayBuilder.java:254)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at org.codehaus.jackson.impl.Utf8Generator._flushBuffer(Utf8Generator.java:1748)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at org.codehaus.jackson.impl.Utf8Generator.close(Utf8Generator.java:1113)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:2575)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at org.codehaus.jackson.map.ObjectMapper.writeValueAsBytes(ObjectMapper.java:2105)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at com.couchbase.touchdb.TDDatabase.appendDictToJSON(TDDatabase.java:554)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at com.couchbase.touchdb.TDDatabase.expandStoredJSONIntoRevisionWithAttachments(TDDatabase.java:658)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at com.couchbase.touchdb.TDDatabase.loadRevisionBody(TDDatabase.java:753)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at com.couchbase.touchdb.replicator.TDPusher$2.onCompletion(TDPusher.java:187)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at com.couchbase.touchdb.support.TDRemoteRequest$2.run(TDRemoteRequest.java:168)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at android.os.Handler.handleCallback(Handler.java:605)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at android.os.Handler.dispatchMessage(Handler.java:92)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at android.os.Looper.loop(Looper.java:137)
05-09 05:57:23.153: E/AndroidRuntime(26586):	at android.os.HandlerThread.run(HandlerThread.java:60)

```