Squashed 'libs/protobuf/' content from commit fcd3b9a85

git-subtree-dir: libs/protobuf
git-subtree-split: fcd3b9a85ef36e46643dc30176cea1a7ad62e02b
This commit is contained in:
Henry Winkel
2022-10-22 14:46:58 +02:00
commit 36bca61764
2186 changed files with 838730 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
// 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();
}
}