Update builds to support strictMode testing
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- build-system, testing-qa
Línea de trabajo
Start by locating the Gradle and Maven build files and their existing test tasks, then determine how strictMode is configured and how the tests should be run twice. The issue does not name files or provide a verified implementation; completion requires a confirmed approach that works in both builds and passes the full test suite.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
After executing the unit tests, set default strictMode to true, then re-run all of the tests.
Fix in both gradle and maven builds. It might be possible (?) to integrate this action into the existing test task, but if not:
In Gradle:
Modify the existing test task (copilot, I have not verified this):
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.12'
}
task modifyCode {
doLast {
// Add your code modification logic here
def file = file('src/main/java/com/example/YourClass.java')
def text = file.text
text = text.replaceAll('oldCode', 'newCode')
file.text = text
println 'Code modified.'
}
}
task rerunTests(dependsOn: ['modifyCode', 'test']) {
doLast {
println 'Re-running tests...'
}
}
test {
finalizedBy 'rerunTests'
}
If a new task is needed (claude.ai, not verified):
dependsOn test
doLast {
// Make your code change here
File sourceFile = file('src/main/java/YourFile.java')
String content = sourceFile.text
content = content.replace('oldCode', 'newCode')
sourceFile.text = content
// Run tests again
tasks.test.execute()
}
}
Copilot also suggests a one-test-run fix for maven, but it requires a new ModifyCode class. Not shown here.
In Maven, new task (claude.ai, not verified):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>test-with-code-change</id>
<phase>verify</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.apache.maven.shared.utils.io.FileUtils</mainClass>
<arguments>
<argument>src/main/java/YourFile.java</argument>
<argument>oldCode</argument>
<argument>newCode</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
- Lenguaje dominante
- Java
- Estrellas
- 4.7k
- Forks
- 2.6k
- Merge medio
- 11 d 18 min
- PR fusionados (30 d)
- 1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stleary/JSON-java
-
Fix before the next release
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
New JSONPointer tests needed Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Fix before the next release
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Todos los issues de stleary/JSON-java
Issues similares
-
Bug Java Platform: Java
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-java#6138 · 1 comentario ·
-
bug needs triage p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 comentario ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/rocketmq-dashboard#4654 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100