Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
712 B
23 lines
712 B
3 years ago
|
// Test that Kokoro is using the expected version of Java.
|
||
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||
|
|
||
|
import org.junit.Test;
|
||
|
import org.junit.runner.RunWith;
|
||
|
import org.junit.runners.JUnit4;
|
||
|
|
||
|
@RunWith(JUnit4.class)
|
||
|
public class JavaVersionTest {
|
||
|
@Test
|
||
|
public void testJavaVersion() throws Exception {
|
||
|
String exp = System.getenv("KOKORO_JAVA_VERSION");
|
||
|
if(exp == null || exp.isEmpty()) {
|
||
|
System.err.println("No kokoro java version found, skipping check");
|
||
|
return;
|
||
|
}
|
||
|
String version = System.getProperty("java.version");
|
||
|
assertWithMessage("Expected Python " + exp + " but found Python " + version)
|
||
|
.that(version.startsWith(exp))
|
||
|
.isTrue();
|
||
|
}
|
||
|
}
|