Remove deprecated junit-platform-surefire-provider (#41)

* Remove deprecated junit-platform-surefire-provider

* [jenkins] re-enable jdk 11 and 12 test builds

jdk 13 is incompatible due to a transiative incompatibility in
spotbugs plugin from kemitix-maven-tiles.

* GitDBBranch: add accessor for name
This commit is contained in:
Paul Campbell 2019-01-27 17:56:46 +00:00 committed by GitHub
parent 02e940ac5f
commit 342e682aff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 23 deletions

View file

@ -53,20 +53,20 @@ pipeline {
}
}
}
// stage('Build Java 11') {
// steps {
// withMaven(maven: 'maven', jdk: 'JDK 11') {
// sh "${mvn} clean verify -Djava.version=11"
// }
// }
// }
// stage('Build Java 12') {
// steps {
// withMaven(maven: 'maven', jdk: 'JDK 12') {
// sh "${mvn} clean verify -Djava.version=12"
// }
// }
// }
stage('Build Java 11') {
steps {
withMaven(maven: 'maven', jdk: 'JDK 11') {
sh "${mvn} clean verify -Djava.version=11"
}
}
}
stage('Build Java 12') {
steps {
withMaven(maven: 'maven', jdk: 'JDK 12') {
sh "${mvn} clean verify -Djava.version=12"
}
}
}
}
}

View file

@ -14,7 +14,6 @@
<kemitix-maven-tiles.version>2.1.3</kemitix-maven-tiles.version>
<kemitix-checkstyle.version>4.1.1</kemitix-checkstyle.version>
<maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
<junit-platform-surefire-provider.version>1.3.2</junit-platform-surefire-provider.version>
<pitest-maven-plugin.version>1.4.3</pitest-maven-plugin.version>
<pitest-junit5-plugin.version>0.8</pitest-junit5-plugin.version>
<lombok.version>1.18.4</lombok.version>
@ -110,13 +109,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit-platform-surefire-provider.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.pitest</groupId>

View file

@ -32,6 +32,13 @@ import net.kemitix.mon.result.Result;
*/
public interface GitDBBranch {
/**
* The name of the branch.
*
* @return the branch name
*/
Result<String> name();
/**
* Lookup a value for the key.
*

View file

@ -34,7 +34,7 @@ import org.eclipse.jgit.lib.Repository;
import java.util.function.Function;
/**
* API for interacting with a branch in a GirDB.
* API for interacting with a branch in a GitDB.
*
* @author Paul Campbell (pcampbell@kemitix.net)
*/
@ -73,6 +73,11 @@ class GitDBBranchImpl implements GitDBBranch {
return Result.ok(new GitDBBranchImpl(branchRef, gitDBRepo, userName, userEmailAddress, branchRef.getName()));
}
@Override
public Result<String> name() {
return Result.ok(name);
}
@Override
public Result<Maybe<String>> get(final String key) {
return gitDBRepo.readValue(branchRef, KEY_PREFIX + key);

View file

@ -392,4 +392,17 @@ class GitDBTest implements WithAssertions {
);
}
@Test
void selectBranch_branchExists_thenBranchName() throws Throwable {
//given
final Path dbDir = dirDoesNotExist();
final Result<GitDB> gitDb = gitDB(dbDir);
//when
final Result<Maybe<String>> branchName = gitDb.flatMap(selectBranch("master"))
.flatMap(branch -> Result.swap(branch.map(GitDBBranch::name)));
//then
assertThat(branchName.orElseThrow().toOptional()).as("Branch name is master")
.contains("refs/heads/master");
}
}