Skip to content

Commit 7afd090

Browse files
authored
Rebased and updated (#401)
Updated logging config. No need to run clean. Will ensure that integration tests are re-run every time because they are not hermetic
1 parent c7d726b commit 7afd090

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

build.gradle

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ test {
104104
exclude '**/*IT$*.class'
105105

106106
testLogging {
107-
events "skipped", "failed"
108-
info {
109-
events "passed", "skipped", "failed"
110-
}
107+
showStandardStreams = true // System.out.println
111108
}
112109
}
113110

@@ -131,17 +128,11 @@ def getAuthInfoFile() {
131128
return authInfoFile
132129
}
133130

134-
135131
task integrationTest(type: Test) {
136132
description 'Runs integration tests against Production or Dev servers.'
137133

138134
useTestNG()
139135

140-
// TestNG specific options
141-
options.parallel 'classes'
142-
options.threadCount 4
143-
options.preserveOrder true
144-
145136
// only select integration tests (similar to maven-failsafe-plugin rules)
146137
include '**/IT*.class'
147138
include '**/*IT.class'
@@ -151,10 +142,7 @@ task integrationTest(type: Test) {
151142
exclude '**/*V1IT$*.class'
152143

153144
testLogging {
154-
events "skipped", "failed"
155-
info {
156-
events "passed", "skipped", "failed"
157-
}
145+
showStandardStreams = true // System.out.println
158146
}
159147

160148
reports {
@@ -174,6 +162,9 @@ task integrationTest(type: Test) {
174162
systemProperty httpRequestorPropertyName, project.property(httpRequestorPropertyName)
175163
}
176164
}
165+
166+
// Will ensure that integration tests are re-run every time because they are not hermetic
167+
outputs.upToDateWhen { false }
177168
}
178169

179170
javadoc {

scripts/run-integration-tests

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,13 @@ trap cleanup EXIT
4848

4949
echo "Running integration tests..."
5050

51-
gradle clean
5251
gradle check
5352

5453
# Run integration tests against major HTTP requestor implementations
5554
for requestor in "OkHttpRequestor" "OkHttp3Requestor" "StandardHttpRequestor" ; do
56-
gradle -Pcom.dropbox.test.httpRequestor="${requestor}" -Pcom.dropbox.test.authInfoFile="${AUTH_FILE}" integrationTest --info
55+
gradle -Pcom.dropbox.test.httpRequestor="${requestor}" -Pcom.dropbox.test.authInfoFile="${AUTH_FILE}" integrationTest
5756
gradle -Pcom.dropbox.test.httpRequestor="${requestor}" -Pcom.dropbox.test.authInfoFile="${AUTH_FILE}" proguardTest
5857
done
5958

6059
# prepare examples to be run
61-
android_gradle clean
6260
android_gradle assemble

src/test/java/com/dropbox/core/v2/files/TagObjectIT.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ public void testTagging() throws Exception {
4545
List<TagObject> tagsWithA = getTagsForPath(client, dropboxPath);
4646
assertEquals("a", tagsWithA.get(0).getUserGeneratedTagValue().getTagText());
4747
Thread.sleep(1000);
48-
49-
48+
5049
// Remove Tag "a" from file
5150
client.files().tagsRemove(dropboxPath, "a");
51+
Thread.sleep(1000);
52+
5253
List<TagObject> tagsNone = getTagsForPath(client, dropboxPath);
5354
assertEquals(0, tagsNone.size());
5455
Thread.sleep(1000);

0 commit comments

Comments
 (0)