Skip to content

Commit

Permalink
Set up JaCoCo Code Coverage, update Gradle wrapper (#756)
Browse files Browse the repository at this point in the history
* Set JaCoCo Codecoverage, fix web build file, remove unused import, upgrade gradle wrapper
  • Loading branch information
dhaval24 authored Oct 2, 2018
1 parent d2e9e16 commit 891f6e6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.microsoft.applicationinsights.channel.concrete.localforwarder;

import static org.junit.Assert.assertEquals;

import com.google.protobuf.BoolValue;
import com.google.protobuf.DoubleValue;
import com.google.protobuf.Duration;
import com.microsoft.applicationinsights.internal.schemav2.Envelope;
import com.microsoft.applicationinsights.internal.util.LocalStringsUtils;
import com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry;
import com.microsoft.applicationinsights.telemetry.BaseTelemetry;
Expand All @@ -21,20 +22,14 @@
import com.microsoft.localforwarder.library.inputs.contracts.SeverityLevel;
import com.microsoft.localforwarder.library.inputs.contracts.StackFrame;
import com.microsoft.localforwarder.library.inputs.contracts.Telemetry;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.*;
import org.mockito.internal.matchers.Null;
import sun.misc.Perf;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;

import static org.junit.Assert.assertEquals;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Test;

/**
* Testing the utility methods in {@link LocalForwarderModelTransformer}
Expand Down
12 changes: 12 additions & 0 deletions gradle/common-java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,24 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent;
import org.gradle.api.tasks.testing.logging.TestExceptionFormat;

apply plugin: 'java'
apply plugin: 'jacoco'

tasks.withType(JavaCompile) {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}

jacoco {
toolVersion = "0.8.2"
}

jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}

if (hasProperty("JDKToUse")) {
logger.info("using $JDKToUse to compile and run tests")
def javaExecutablesPath = new File(JDKToUse, 'bin')
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Feb 09 18:53:31 PST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip
1 change: 1 addition & 0 deletions web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ dependencies {
testCompile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.1'
testCompile group: 'org.json', name:'json', version:'20090211'
testCompile group: 'com.microsoft.azure', name: 'azure-storage', version: '2.1.0'
testCompile group: 'com.google.guava', name: 'guava', version: '20.0'
}

shadowJar {
Expand Down

0 comments on commit 891f6e6

Please sign in to comment.