Skip to content

Commit

Permalink
Merge pull request cloudant#212 from cloudant/jenkins-build-improvements
Browse files Browse the repository at this point in the history
Jenkins build improvements
  • Loading branch information
tomblench committed Oct 28, 2015
2 parents 4989e41 + 1cc5358 commit 25e0bd2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
24 changes: 20 additions & 4 deletions AndroidTest/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,21 @@ android {
"$scriptLocation/../../cloudant-sync-datastore-android-encryption/src/main/java"]
}
androidTest {
java.srcDirs = ["$scriptLocation/../../cloudant-sync-datastore-core/src/test/java/",
"$scriptLocation/../../cloudant-sync-datastore-android/src/test/java/",
"$scriptLocation/../../cloudant-sync-datastore-android-encryption/src/test/java/"
]
java {
srcDirs = ["$scriptLocation/../../cloudant-sync-datastore-core/src/test/java/",
"$scriptLocation/../../cloudant-sync-datastore-android/src/test/java/",
"$scriptLocation/../../cloudant-sync-datastore-android-encryption/src/test/java/"
]
// we would exclude these via categories but it doesn't like the android runner respects them
exclude '**/Unreliable*Test*'
// some of these tests fail as follows:
// java.lang.OutOfMemoryError: Failed to allocate a
// 8204 byte allocation with 4194304 free bytes and
// 8MB until OOM; failed due to fragmentation
// (required continguous free 12288 bytes where
// largest contiguous free 8192 bytes)
exclude '**/KeyManagerTests*'
}
}
}

Expand All @@ -56,6 +67,11 @@ android {
exclude 'META-INF/NOTICE.txt'

}

adbOptions {
timeOutInMs 30*1000 // 30 seconds in ms.
}

}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion AndroidTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
classpath 'com.android.tools.build:gradle:1.3.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public InputStream getInputStream() {
@Test
public void testCookieAuthWithoutRetry() throws IOException {

Assume.assumeFalse(TestOptions.IGNORE_AUTH_HEADERS);
if(TestOptions.IGNORE_AUTH_HEADERS){return;}

CookieInterceptor interceptor = new CookieInterceptor(TestOptions.COUCH_USERNAME, TestOptions.COUCH_PASSWORD);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public void setUp() throws Exception {
public void replicationFromCompactedDB() throws Exception{
// if the test case is running against Cloudant, this test should not execute since
// Cloudant returns 403 - Forbidden when attempting to call _compact
Assume.assumeFalse(TestOptions.IGNORE_COMPACTION);
if(TestOptions.IGNORE_COMPACTION){return;}
// skip test if we are doing cookie auth, we don't have the interceptor chain to do it
// when we call ClientTestUtils.executeHttpPostRequest
Assume.assumeFalse(TestOptions.COOKIE_AUTH);
if(TestOptions.COOKIE_AUTH){return;}

String documentName;
Bar bar = BarUtils.createBar(remoteDb, "Bob", 12);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Created by tomblench on 15/07/15.
*/

@Category({RequireRunningCouchDB.class, RequireRunningProxy.class})
@Category(RequireRunningProxy.class)
public class UnreliableNetworkPullTest extends ProxyTestBase {

String jsonAddToxic = "{\"enabled\" :true, \"timeout\":50, \"sometimesToxic\": true, \"toxicity\" :0.5}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/


@Category({RequireRunningCouchDB.class, RequireRunningProxy.class})
@Category(RequireRunningProxy.class)
public class UnreliableNetworkPushTest extends ProxyTestBase {


Expand Down

0 comments on commit 25e0bd2

Please sign in to comment.