Bug: Java agent breaks an assertion in ShardingSphere
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginne im Modul shardingsphere-spi bei RequiredSPIRegistryTest.java, insbesondere bei assertRegisteredServiceNotExisted in Zeile 40, und reproduziere den Fehler mit mvn test, während die Aufzeichnung aktiviert ist. Verfolge, warum der Test statt ServiceProviderNotFoundException eine NullPointerException erhält, und überprüfe anschließend, dass die Modultests mit aktivem Java agent erfolgreich durchlaufen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Setup: see #105
Module: shardingsphere-spi
With the recording on, one test fails with an error:
mvn test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: aarch_64
[INFO] os.detected.version: 11.5
[INFO] os.detected.version.major: 11
[INFO] os.detected.version.minor: 5
[INFO] os.detected.classifier: osx-aarch_64
[INFO]
[INFO] ------------< org.apache.shardingsphere:shardingsphere-spi >------------
[INFO] Building shardingsphere-spi 5.0.0-RC1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven-version) @ shardingsphere-spi ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-banned-dependencies) @ shardingsphere-spi ---
[INFO]
[INFO] --- maven-checkstyle-plugin:3.1.0:check (validate) @ shardingsphere-spi ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (default) @ shardingsphere-spi ---
[INFO] argLine set to -javaagent:/Users/ptrdvrk/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/ptrdvrk/work/github/java/shardingsphere/shardingsphere/shardingsphere-spi/target/jacoco.exec
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ shardingsphere-spi ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ shardingsphere-spi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/ptrdvrk/work/github/java/shardingsphere/shardingsphere/shardingsphere-spi/src/main/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ shardingsphere-spi ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ shardingsphere-spi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ shardingsphere-spi ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- appmap-maven-plugin:1.2.0:prepare-agent (default) @ shardingsphere-spi ---
[INFO] Initializing AppLand AppMap Java Recorder.
[INFO] argLine set to -Dappmap.event.valueSize=1024 -Dappmap.config.file=/Users/ptrdvrk/work/github/java/shardingsphere/shardingsphere/appmap.yml -Dappmap.output.directory=target/appmap -javaagent:/Users/ptrdvrk/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/ptrdvrk/work/github/java/shardingsphere/shardingsphere/shardingsphere-spi/target/jacoco.exec -javaagent:/Users/ptrdvrk/.m2/repository/com/appland/appmap-agent/1.5.0/appmap-agent-1.5.0.jar
[INFO]
[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ shardingsphere-spi ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.shardingsphere.spi.ShardingSphereServiceLoaderTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.409 s - in org.apache.shardingsphere.spi.ShardingSphereServiceLoaderTest
[INFO] Running org.apache.shardingsphere.spi.required.RequiredSPIRegistryTest
[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.039 s <<< FAILURE! - in org.apache.shardingsphere.spi.required.RequiredSPIRegistryTest
[ERROR] assertRegisteredServiceNotExisted(org.apache.shardingsphere.spi.required.RequiredSPIRegistryTest) Time elapsed: 0.017 s <<< ERROR!
java.lang.Exception: Unexpected exception, expected<org.apache.shardingsphere.spi.exception.ServiceProviderNotFoundException> but was<java.lang.NullPointerException>
at org.apache.shardingsphere.spi.required.RequiredSPIRegistryTest.assertRegisteredServiceNotExisted(RequiredSPIRegistryTest.java:40)
[INFO] Running org.apache.shardingsphere.spi.optional.OptionalSPIRegistryTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 s - in org.apache.shardingsphere.spi.optional.OptionalSPIRegistryTest
[INFO] Running org.apache.shardingsphere.spi.typed.TypedSPIRegistryTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 s - in org.apache.shardingsphere.spi.typed.TypedSPIRegistryTest
[INFO] Running org.apache.shardingsphere.spi.ordered.cache.OrderedServicesCacheTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.053 s - in org.apache.shardingsphere.spi.ordered.cache.OrderedServicesCacheTest
[INFO] Running org.apache.shardingsphere.spi.ordered.OrderedSPIRegistryTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.039 s - in org.apache.shardingsphere.spi.ordered.OrderedSPIRegistryTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] RequiredSPIRegistryTest.assertRegisteredServiceNotExisted » Unexpected except...
[INFO]
[ERROR] Tests run: 18, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.337 s
[INFO] Finished at: 2021-09-10T16:23:22-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project shardingsphere-spi: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/ptrdvrk/work/github/java/shardingsphere/shardingsphere/shardingsphere-spi/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
- Vorherrschende Sprache
- Java
- Sterne
- 88
- Forks
- 17
- Ø Merge
- 2 T. 2 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus getappmap/appmap-java
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 28/100
getappmap/appmap-java#333 ·
-
appmap.yml packages path matching zero classes yields a healthy-looking recording with no warningOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
getappmap/appmap-java#332 · 1 Kommentar ·
-
Git metadata dropped in a git worktree (.git file with gitdir: pointer not followed)Evtl. vergeben @dividedmind hat das vor 1 Tag übernommen. Offen
getappmap/appmap-java#331 · 1 Kommentar · 1 zugewiesene Person ·
-
Labeled methods should always be recorded, even if they match trivial-method filtersEvtl. vergeben @kgilpin hat das vor 191 Tagen übernommen. Offen
getappmap/appmap-java#323 · 1 Reaktion · 2 zugewiesene Personen ·
-
Warning with Java 25Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
getappmap/appmap-java#322 ·
Alle Issues in getappmap/appmap-java
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Netcracker/qubership-integration-platform#1046 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Fix Math.ceilDiv wrong result for exact positive divisionsEvtl. vergeben @pamod-madubashana hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
scala-native/scala-native#5094 ·
Maintainer antworten meist innerhalb von 1 Tag
-
NullPointerException in blocking command completion callback when the command succeeds (3.52.0)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 2 Tagen