Skip to content

Commit

Permalink
more robust caching for circleci, set root project name (linkedin#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
radai-rosenblatt authored and smccauliff committed Jul 19, 2017
1 parent 9020fdc commit b310526
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ jobs:
- restore_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
- run:
command: ./gradlew resolveDependencies
command: ./gradlew clean build
- save_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
paths:
- ~/.gradle
- run:
command: ./gradlew clean build
- run:
command: mkdir ~/test-results
- run:
Expand Down
7 changes: 1 addition & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ buildscript {
}
}

plugins {
id 'io.ehdev.gradle.dependency-resolve' version '0.0.24'
}

group = 'com.linkedin.kafka.clients'

import com.linkedin.gradle.build.DistributeTask
Expand Down Expand Up @@ -73,7 +69,7 @@ test.dependsOn('checkstyleMain', 'checkstyleTest')
//code quality and inspections

checkstyle {
toolVersion = '7.5.1'
toolVersion = '8.0'
}

//build artifacts
Expand Down Expand Up @@ -164,7 +160,6 @@ task distributeBuild(type: DistributeTask) {
dependsOn ':artifactoryPublish'
}


//wrapper generation task

task wrapper(type: Wrapper) {
Expand Down
7 changes: 0 additions & 7 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
/*
* Copyright 2017 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License").
 See License in the project root for license information.
*/
pluginManagement {
repositories {
gradlePluginPortal()
maven { url 'https://dl.bintray.com/ethankhall/crom/' }
maven { url 'https://dl.bintray.com/ethankhall/gradle-plugins/' }
}
}
rootProject.name = 'li-apache-kafka-clients'


Original file line number Diff line number Diff line change
Expand Up @@ -441,19 +441,21 @@ public void onComplete(Map<TopicPartition, OffsetAndMetadata> topicPartitionOffs
};
consumer.commitAsync(commitCallback);
while (!offsetCommitted.get()) {
consumer.poll(10);
consumer.poll(20);
}
assertEquals(consumer.committed(tp), new OffsetAndMetadata(3, ""), "The committed user offset should be 3");
OffsetAndMetadata committed = consumer.committed(tp);
assertEquals(committed, new OffsetAndMetadata(3, ""), "The committed user offset should be 3, instead was " + committed);
assertEquals(consumer.committedSafeOffset(tp).longValue(), 0, "The committed actual offset should be 0");

offsetCommitted.set(false);
Map<TopicPartition, OffsetAndMetadata> offsetMap = new HashMap<>();
offsetMap.put(tp, new OffsetAndMetadata(0));
consumer.commitAsync(offsetMap, commitCallback);
while (!offsetCommitted.get()) {
consumer.poll(10);
consumer.poll(20);
}
assertEquals(consumer.committed(tp), new OffsetAndMetadata(0, ""), "The committed user offset should be 0");
committed = consumer.committed(tp);
assertEquals(committed, new OffsetAndMetadata(0, ""), "The committed user offset should be 0, instead was " + committed);
assertEquals(consumer.committedSafeOffset(tp).longValue(), 0, "The committed actual offset should be 0");
}
}
Expand Down

0 comments on commit b310526

Please sign in to comment.