mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1242284 - Pre: Remove no longer required Maven repository; bump test-only dependency. r=me
jcenter() now contains both com.squareup.spoon:spoon-runner:1.1.10 and org.simpleframework:simple-http:6.0.1 so we can get rid of some outdated listings.
This commit is contained in:
parent
66c53a6449
commit
420a54dc14
@ -25,10 +25,6 @@ buildscript {
|
||||
maven {
|
||||
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
|
||||
}
|
||||
// For spoon SNAPSHOT releases.
|
||||
maven {
|
||||
url 'https://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -122,7 +122,7 @@ dependencies {
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile 'org.robolectric:robolectric:3.0'
|
||||
testCompile 'org.simpleframework:simple-http:4.1.13'
|
||||
testCompile 'org.simpleframework:simple-http:6.0.1'
|
||||
testCompile 'org.mockito:mockito-core:1.10.19'
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ public class TestGlobalSession {
|
||||
|
||||
final HttpResponse response = new BasicHttpResponse(
|
||||
new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 503, "Illegal method/protocol"));
|
||||
response.addHeader("X-Weave-Backoff", Long.toString(TEST_BACKOFF_IN_SECONDS)); // Backoff given in seconds.
|
||||
response.setHeader("X-Weave-Backoff", Long.toString(TEST_BACKOFF_IN_SECONDS)); // Backoff given in seconds.
|
||||
|
||||
getTestWaiter().performWait(WaitHelper.onThreadRunnable(new Runnable() {
|
||||
@Override
|
||||
@ -245,7 +245,7 @@ public class TestGlobalSession {
|
||||
@Override
|
||||
public void handle(Request request, Response response) {
|
||||
if (stageShouldBackoff) {
|
||||
response.set("X-Weave-Backoff", Long.toString(TEST_BACKOFF_IN_SECONDS));
|
||||
response.addValue("X-Weave-Backoff", Long.toString(TEST_BACKOFF_IN_SECONDS));
|
||||
}
|
||||
super.handle(request, response);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
@ -149,7 +150,7 @@ public class TestSyncStorageRequest {
|
||||
@Override
|
||||
public void handle(Request request, Response response) {
|
||||
String errorBody = EXPECTED_RETRY_AFTER_ERROR_MESSAGE;
|
||||
response.set("Retry-After", "3001");
|
||||
response.setValue("Retry-After", "3001");
|
||||
super.handle(request, response, 503, errorBody);
|
||||
}
|
||||
}
|
||||
@ -185,7 +186,7 @@ public class TestSyncStorageRequest {
|
||||
public class WeaveBackoffMockServer extends MockServer {
|
||||
@Override
|
||||
public void handle(Request request, Response response) {
|
||||
response.set("X-Weave-Backoff", "1801");
|
||||
response.setValue("X-Weave-Backoff", "1801");
|
||||
super.handle(request, response);
|
||||
}
|
||||
}
|
||||
@ -226,10 +227,10 @@ public class TestSyncStorageRequest {
|
||||
public class HeadersMockServer extends MockServer {
|
||||
@Override
|
||||
public void handle(Request request, Response response) {
|
||||
response.set("X-Weave-Quota-Remaining", "65536");
|
||||
response.set("X-Weave-Alert", "First weave alert string");
|
||||
response.add("X-Weave-Alert", "Second weave alert string");
|
||||
response.set("X-Weave-Records", "50");
|
||||
response.setValue("X-Weave-Quota-Remaining", "65536");
|
||||
response.setValue("X-Weave-Alert", "First weave alert string");
|
||||
response.addValue("X-Weave-Alert", "Second weave alert string");
|
||||
response.setValue("X-Weave-Records", "50");
|
||||
|
||||
super.handle(request, response);
|
||||
}
|
||||
@ -249,7 +250,7 @@ public class TestSyncStorageRequest {
|
||||
public class DeleteMockServer extends MockServer {
|
||||
@Override
|
||||
public void handle(Request request, Response response) {
|
||||
assertTrue(request.contains("x-confirm-delete"));
|
||||
assertNotNull(request.getValue("x-confirm-delete"));
|
||||
assertEquals("1", request.getValue("x-confirm-delete"));
|
||||
super.handle(request, response);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ package org.mozilla.android.sync.test.helpers;
|
||||
import org.mozilla.gecko.background.common.log.Logger;
|
||||
import org.mozilla.gecko.sync.net.BaseResource;
|
||||
import org.mozilla.gecko.sync.net.BaseResourceDelegate;
|
||||
import org.simpleframework.http.core.ContainerSocketProcessor;
|
||||
import org.simpleframework.transport.connect.Connection;
|
||||
import org.simpleframework.transport.connect.SocketConnection;
|
||||
|
||||
@ -180,7 +181,7 @@ public class HTTPServerTestHelper {
|
||||
|
||||
try {
|
||||
this.server = server;
|
||||
connection = new SocketConnection(server);
|
||||
connection = new SocketConnection(new ContainerSocketProcessor(server));
|
||||
SocketAddress address = new InetSocketAddress(port);
|
||||
connection.connect(address);
|
||||
|
||||
|
@ -39,13 +39,13 @@ public class MockServer implements Container {
|
||||
|
||||
PrintStream bodyStream = response.getPrintStream();
|
||||
response.setCode(code);
|
||||
response.set("Content-Type", contentType);
|
||||
response.set("Server", "HelloWorld/1.0 (Simple 4.0)");
|
||||
response.setValue("Content-Type", contentType);
|
||||
response.setValue("Server", "HelloWorld/1.0 (Simple 4.0)");
|
||||
response.setDate("Date", time);
|
||||
response.setDate("Last-Modified", time);
|
||||
|
||||
final String timestampHeader = Utils.millisecondsToDecimalSecondsString(time);
|
||||
response.set("X-Weave-Timestamp", timestampHeader);
|
||||
response.setValue("X-Weave-Timestamp", timestampHeader);
|
||||
Logger.debug(LOG_TAG, "> X-Weave-Timestamp header: " + timestampHeader);
|
||||
return bodyStream;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user