Skip to content

Commit 710117e

Browse files
elharochingor13
authored andcommitted
Fix broken snapshot and proto tests (#512)
* fix snapshot tests * ignore eclipse metadata * reset some sample files * fix prototest
1 parent 287cca1 commit 710117e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ target/
22
bin/
33
*.iml
44
.idea
5+
.project
6+
.settings
7+
.classpath
8+

google-http-client-protobuf/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<artifactId>maven-protoc-plugin</artifactId>
4848
<version>0.4.2</version>
4949
<configuration>
50-
<protocArtifact>com.google.protobuf:protoc:${project.protobuf-java.version}-build2:exe:${os.detected.classifier}</protocArtifact>
50+
<protocArtifact>com.google.protobuf:protoc:${project.protobuf-java.version}:exe:${os.detected.classifier}</protocArtifact>
5151
</configuration>
5252
<executions>
5353
<execution>

google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,8 @@ public LowLevelHttpRequest buildRequest(String method, String url) throws IOExce
745745
assertEquals(ImmutableList.of("a2", "b2", "c2"), lowLevelRequest.getHeaderValues("objlist"));
746746
assertEquals(ImmutableList.of("a1", "a2"), lowLevelRequest.getHeaderValues("r"));
747747
assertTrue(lowLevelRequest.getHeaderValues("accept-encoding").isEmpty());
748-
assertEquals(ImmutableList.of("foo " + HttpRequest.USER_AGENT_SUFFIX),
748+
assertEquals(ImmutableList.of("foo Google-HTTP-Java-Client/"
749+
+ HttpRequest.VERSION + " (gzip)"),
749750
lowLevelRequest.getHeaderValues("user-agent"));
750751
assertEquals(ImmutableList.of("b"), lowLevelRequest.getHeaderValues("a"));
751752
assertEquals(ImmutableList.of("VALUE"), lowLevelRequest.getHeaderValues("value"));
@@ -984,7 +985,8 @@ public void testExecute_curlLogger() throws Exception {
984985
if (message.startsWith("curl")) {
985986
found = true;
986987
assertEquals("curl -v --compressed -H 'Accept-Encoding: gzip' -H 'User-Agent: "
987-
+ HttpRequest.USER_AGENT_SUFFIX + "' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'",
988+
+ "Google-HTTP-Java-Client/" + HttpRequest.VERSION + " (gzip)"
989+
+ "' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'",
988990
message);
989991
}
990992
}

0 commit comments

Comments
 (0)