Skip to content

Commit

Permalink
MINOR: Update dependencies for Kafka 2.5 (#7909)
Browse files Browse the repository at this point in the history
Noteworthy:
* zstd decompression speed improvement of ~10%:
https://github.com/facebook/zstd/releases/tag/v1.4.4
* EasyMock, PowerMock and Mockito: improved support for Java 13.
* Replace usage of method deprecated by Mockito.
* Gradle plugins updated to versions that require Gradle 5.x, this is
fine since we no longer depend on the installed Gradle version.
* Fixed build not to depend on methods deprecated in Gradle 5.x
(fixes KAFKA-8786).
* Reflections 0.9.12 no longer depends on Guava (fixes KAFKA-3061).
* Updated `OptimizedKTableIntegrationTest` to pass with new version
of Hamcrest.
* Several Jetty improvements and bug fixes:
   - https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.21.v20190926
   - https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.22.v20191022
   - https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.23.v20191118
   - https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.24.v20191120
   - https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.25.v20191220

Note that I did not upgrade lz4 due to lz4/lz4-java#156.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>

Co-authored-by: Ismael Juma <ismael@juma.me.uk>
Co-authored-by: Aljoscha <aljoscha.poertner@posteo.de>
  • Loading branch information
ijuma and aljoshare committed Jan 9, 2020
1 parent e63becb commit a024e67
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 52 deletions.
25 changes: 10 additions & 15 deletions build.gradle
Expand Up @@ -36,7 +36,7 @@ buildscript {
classpath "com.github.jengelman.gradle.plugins:shadow:$versions.shadowPlugin"
classpath "org.owasp:dependency-check-gradle:$versions.owaspDepCheckPlugin"
classpath "com.diffplug.spotless:spotless-plugin-gradle:$versions.spotlessPlugin"
classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:$versions.spotbugsPlugin"
classpath "com.github.spotbugs:spotbugs-gradle-plugin:$versions.spotbugsPlugin"
}
}

Expand All @@ -54,7 +54,7 @@ allprojects {
repositories {
mavenCentral()
}

apply plugin: 'idea'
apply plugin: 'org.owasp.dependencycheck'
apply plugin: 'com.github.ben-manes.versions'
Expand Down Expand Up @@ -559,8 +559,8 @@ def fineTuneEclipseClasspathFile(eclipse, project) {
if (project.name.equals('core')) {
cp.entries.findAll { it.kind == "src" && it.path.equals("src/test/scala") }*.excludes = ["integration/", "other/", "unit/"]
}
/*
* Set all eclipse build output to go to 'build_eclipse' directory. This is to ensure that gradle and eclipse use different
/*
* Set all eclipse build output to go to 'build_eclipse' directory. This is to ensure that gradle and eclipse use different
* build output directories, and also avoid using the eclpise default of 'bin' which clashes with some of our script directories.
* https://discuss.gradle.org/t/eclipse-generated-files-should-be-put-in-the-same-place-as-the-gradle-generated-files/6986/2
*/
Expand All @@ -587,10 +587,10 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
description = 'Generates an aggregate report from all subprojects'
dependsOn(javaProjects.test)

additionalSourceDirs = files(javaProjects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(javaProjects.sourceSets.main.allSource.srcDirs)
classDirectories = files(javaProjects.sourceSets.main.output)
executionData = files(javaProjects.jacocoTestReport.executionData)
additionalSourceDirs.from = javaProjects.sourceSets.main.allSource.srcDirs
sourceDirectories.from = javaProjects.sourceSets.main.allSource.srcDirs
classDirectories.from = javaProjects.sourceSets.main.output
executionData.from = javaProjects.jacocoTestReport.executionData

reports {
html.enabled = true
Expand Down Expand Up @@ -749,19 +749,14 @@ project(':core') {
testCompile libs.scalatest
testCompile libs.slf4jlog4j
testCompile libs.jfreechart

scoverage libs.scoveragePlugin
scoverage libs.scoverageRuntime
}

scoverage {
scoverageVersion = "$versions.scoverage"
reportDir = file("${rootProject.buildDir}/scoverage")
highlighting = false
}
checkScoverage {
minimumRate = 0.0
}
checkScoverage.shouldRunAfter('test')

configurations {
// manually excludes some unnecessary dependencies
Expand Down
Expand Up @@ -22,7 +22,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.verifyNoInteractions;

import java.io.IOException;
import java.util.Collections;
Expand Down Expand Up @@ -207,8 +207,8 @@ public void login1Commit1Login2Commit2Logout1Login3Commit3Logout2() throws Login
assertSame(tokens[2], privateCredentials.iterator().next());
assertSame(extensions[2], publicCredentials.iterator().next());

verifyZeroInteractions((Object[]) tokens);
verifyZeroInteractions((Object[]) extensions);
verifyNoInteractions((Object[]) tokens);
verifyNoInteractions((Object[]) extensions);
}

@Test
Expand Down Expand Up @@ -269,8 +269,8 @@ public void login1Commit1Logout1Login2Commit2Logout2() throws LoginException {
assertEquals(0, privateCredentials.size());
assertEquals(0, publicCredentials.size());

verifyZeroInteractions((Object[]) tokens);
verifyZeroInteractions((Object[]) extensions);
verifyNoInteractions((Object[]) tokens);
verifyNoInteractions((Object[]) extensions);
}

@Test
Expand Down Expand Up @@ -321,8 +321,8 @@ public void loginAbortLoginCommitLogout() throws LoginException {
assertEquals(0, privateCredentials.size());
assertEquals(0, publicCredentials.size());

verifyZeroInteractions((Object[]) tokens);
verifyZeroInteractions((Object[]) extensions);
verifyNoInteractions((Object[]) tokens);
verifyNoInteractions((Object[]) extensions);
}

@Test
Expand Down Expand Up @@ -405,8 +405,8 @@ public void login1Commit1Login2Abort2Login3Commit3Logout3() throws LoginExceptio
assertEquals(1, publicCredentials.size());
assertSame(extensions[2], publicCredentials.iterator().next());

verifyZeroInteractions((Object[]) tokens);
verifyZeroInteractions((Object[]) extensions);
verifyNoInteractions((Object[]) tokens);
verifyNoInteractions((Object[]) extensions);
}

/**
Expand Down Expand Up @@ -434,6 +434,6 @@ public void commitDoesNotThrowOnUnsupportedExtensionsCallback() throws LoginExce
assertNotNull(extensions);
assertTrue(extensions.map().isEmpty());

verifyZeroInteractions((Object[]) tokens);
verifyNoInteractions((Object[]) tokens);
}
}
49 changes: 23 additions & 26 deletions gradle/dependencies.gradle
Expand Up @@ -60,27 +60,27 @@ versions += [
apacheda: "1.0.2",
apacheds: "2.0.0-M24",
argparse4j: "0.7.0",
bcpkix: "1.63",
bcpkix: "1.64",
checkstyle: "8.20",
commonsCli: "1.4",
gradle: "5.6.2",
gradleVersionsPlugin: "0.21.0",
grgit: "3.1.1",
httpclient: "4.5.9",
easymock: "4.0.2",
jackson: "2.10.0",
gradleVersionsPlugin: "0.27.0",
grgit: "4.0.1",
httpclient: "4.5.10",
easymock: "4.1",
jackson: "2.10.2",
jacoco: "0.8.3",
jetty: "9.4.20.v20190813",
jetty: "9.4.25.v20191220",
jersey: "2.28",
jmh: "1.21",
hamcrest: "2.1",
jmh: "1.22",
hamcrest: "2.2",
log4j: "1.2.17",
scalaLogging: "3.9.2",
jaxb: "2.3.0",
jaxrs: "2.1.1",
jfreechart: "1.0.0",
jopt: "5.0.4",
junit: "4.13-beta-2",
junit: "4.13",
kafka_0100: "0.10.0.1",
kafka_0101: "0.10.1.1",
kafka_0102: "0.10.2.2",
Expand All @@ -93,29 +93,28 @@ versions += [
kafka_23: "2.3.1",
kafka_24: "2.4.0",
lz4: "1.6.0",
mavenArtifact: "3.6.1",
mavenArtifact: "3.6.3",
metrics: "2.2.0",
mockito: "3.0.0",
owaspDepCheckPlugin: "5.2.1",
powermock: "2.0.2",
reflections: "0.9.11",
mockito: "3.2.4",
owaspDepCheckPlugin: "5.2.4",
powermock: "2.0.4",
reflections: "0.9.12",
rocksDB: "5.18.3",
scalaCollectionCompat: "2.1.2",
scalaCollectionCompat: "2.1.3",
scalafmt: "1.5.1",
scalaJava8Compat : "0.9.0",
scalatest: "3.0.8",
scoverage: "1.4.0",
scoveragePlugin: "2.5.0",
shadowPlugin: "4.0.4",
slf4j: "1.7.28",
scoverage: "1.4.1",
scoveragePlugin: "4.0.1",
shadowPlugin: "5.2.0",
slf4j: "1.7.30",
snappy: "1.1.7.3",
spotbugs: "3.1.12",
spotbugsPlugin: "1.6.9",
spotlessPlugin: "3.23.1",
spotbugsPlugin: "3.0.0",
spotlessPlugin: "3.27.0",
zookeeper: "3.5.6",
zstd: "1.4.3-1"
zstd: "1.4.4-3"
]

libs += [
activation: "javax.activation:activation:$versions.activation",
apacheda: "org.apache.directory.api:api-all:$versions.apacheda",
Expand Down Expand Up @@ -175,8 +174,6 @@ libs += [
scalaLogging: "com.typesafe.scala-logging:scala-logging_$versions.baseScala:$versions.scalaLogging",
scalaReflect: "org.scala-lang:scala-reflect:$versions.scala",
scalatest: "org.scalatest:scalatest_$versions.baseScala:$versions.scalatest",
scoveragePlugin: "org.scoverage:scalac-scoverage-plugin_$versions.baseScala:$versions.scoverage",
scoverageRuntime: "org.scoverage:scalac-scoverage-runtime_$versions.baseScala:$versions.scoverage",
slf4jApi: "org.slf4j:slf4j-api:$versions.slf4j",
slf4jlog4j: "org.slf4j:slf4j-log4j12:$versions.slf4j",
snappy: "org.xerial.snappy:snappy-java:$versions.snappy",
Expand Down
Expand Up @@ -196,7 +196,7 @@ public void shouldApplyUpdatesToStandbyStore() throws Exception {
assertThat(restoreStartOffset.get(), is(anyOf(greaterThan(0L), equalTo(-1L))));

// Assert that either restore was unnecessary or we restored to the last offset before we closed the kafkaStreams
assertThat(restoreEndOffset.get(), is(anyOf(equalTo(batch1NumMessages - 1), equalTo(-1L))));
assertThat(restoreEndOffset.get(), is(anyOf(equalTo(batch1NumMessages - 1L), equalTo(-1L))));

// Assert that the current value in store reflects all messages being processed
assertThat(newActiveStore.get(key), is(equalTo(totalNumMessages - 1)));
Expand Down

0 comments on commit a024e67

Please sign in to comment.