Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Muliple unit test fails if gitconfig has commit.gpgsign=true #1990

Closed
rickard-von-essen opened this issue Jan 10, 2024 · 1 comment · Fixed by #2021
Closed

Muliple unit test fails if gitconfig has commit.gpgsign=true #1990

rickard-von-essen opened this issue Jan 10, 2024 · 1 comment · Fixed by #2021
Labels

Comments

@rickard-von-essen
Copy link

Trying to run ./gradlew clean test --no-build-cache fails on multiple unit test if ~/.gitconfig contains:

[commit]
   gpgsign = true

IMHO the fix for this is to have a canned gitconfig that unit tests uses to avoid depending on the devs setup.

These tests fails:

  • GitRatchetGradleTest. [1] 0
  • GitRatchetGradleTest. [1] 0
  • LicenseHeaderTest. ratchetFrom()
  • LicenseHeaderTest. ratchetFromButUpdateFalse()

Example stacktrace:

org.eclipse.jgit.api.errors.ServiceUnavailableException: Signing service is not available
	at app//org.eclipse.jgit.api.CommitCommand.sign(CommitCommand.java:328)
	at app//org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:283)
	at app//com.diffplug.gradle.spotless.GitRatchetGradleTest.addAndCommit(GitRatchetGradleTest.java:274)
	at app//com.diffplug.gradle.spotless.GitRatchetGradleTest.multiProject(GitRatchetGradleTest.java:189)
	at java.base@17.0.5/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base@17.0.5/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base@17.0.5/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base@17.0.5/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at java.base@17.0.5/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
	at java.base@17.0.5/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base@17.0.5/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base@17.0.5/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base@17.0.5/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at java.base@17.0.5/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base@17.0.5/java.util.ArrayList.forEach(ArrayList.java:1511)

Git hash: 6579264
OS: Linux fedora-116004 6.6.3-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 28 19:11:52 UTC 2023 x86_64 GNU/Linux

@nedtwigg
Copy link
Member

Fixed thanks to @goughy000, if it's still broken please comment again and I'll reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants