Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Tests not passing: TestStatsReporter Flush not flushing

Abierto
#2,750 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java
Área
testing

Línea de trabajo

Empieza ejecutando ./gradlew test o ./gradlew build e inspecciona TestStatsReporter.java, especialmente flush() y assertCounter(), junto con WorkflowFailedMetricsTests.java. Reproduce los fallos en los métodos de prueba indicados y determina por qué reporter.flush() no hace que las métricas esperadas estén disponibles. Se considera terminado cuando las pruebas afectadas y la compilación limpia pasan de forma consistente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Expected Behavior

I'd expect running ./gradlew test or build would pass on a clean main branch. That is not happening.
WorkflowFailedMetricsTests.java runs a @Before setup that contains: reporter.flush()
Some methods are experiencing failures when ran in conjunction with other tests, such as:
runtimeExceptionWorkflowFailedMetric java.lang.AssertionError: No metric 'temporal_workflow_failed [namespace=UnitTest|task_queue=WorkflowTest-runtimeExceptionWorkflowFailedMetric-b83ed43d-267b-430a-8634-4ecc35a5ceb2|workflow_type=TestWorkflow]', reported metrics: temporal_poller_start [namespace=UnitTest|task_queue=WorkflowTest-runtimeExceptionWorkflowFailedMetric-b83ed43d-267b-430a-8634-4ecc35a5ceb2|worker_type=WorkflowWorker] temporal_worker_start [namespace=UnitTest|task_queue=WorkflowTest-runtimeExceptionWorkflowFailedMetric-b83ed43d-267b-430a-8634-4ecc35a5ceb2|worker_type=WorkflowWorker] temporal_request [operation=DescribeNamespace] temporal_long_request [namespace=UnitTest|operation=GetWorkflowExecutionHistory] temporal_request [] temporal_request [operation=GetSystemInfo] temporal_request [namespace=UnitTest|operation=StartWorkflowExecution|task_queue=WorkflowTest-runtimeExceptionWorkflowFailedMetric-b83ed43d-267b-430a-8634-4ecc35a5ceb2|workflow_type=TestWorkflow] temporal_long_request [namespace=UnitTest|operation=PollWorkflowTaskQueue|task_queue=WorkflowTest-runtimeExceptionWorkflowFailedMetric-b83ed43d-267b-430a-8634-4ecc35a5ceb2|worker_type=WorkflowWorker] temporal_workflow_task_queue_poll_succeed [namespace=UnitTest|task_queue=WorkflowTest-runtimeExceptionWorkflowFailedMetric-b83ed43d-267b-430a-8634-4ecc35a5ceb2|worker_type=WorkflowWorker] at org.junit.Assert.fail(Assert.java:89) at io.temporal.common.reporter.TestStatsReporter.assertCounter(TestStatsReporter.java:53) at io.temporal.common.reporter.TestStatsReporter.assertCounter(TestStatsReporter.java:45) at io.temporal.internal.worker.WorkflowFailedMetricsTests.runtimeExceptionWorkflowFailedMetric(WorkflowFailedMetricsTests.java:164) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at io.temporal.testing.internal.SDKTestWorkflowRule$1.evaluate(SDKTestWorkflowRule.java:233) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.lang.Thread.run(Thread.java:1583) workflowFailureMetricBenignApplicationError java.lang.AssertionError: No metric 'temporal_workflow_failed [namespace=UnitTest|task_queue=WorkflowTest-workflowFailureMetricBenignApplicationError-20c969a7-bd07-49f5-b275-eea4eacb2533|workflow_type=ApplicationFailureWorkflow]', reported metrics: temporal_worker_start [namespace=UnitTest|task_queue=WorkflowTest-workflowFailureMetricBenignApplicationError-20c969a7-bd07-49f5-b275-eea4eacb2533|worker_type=WorkflowWorker] temporal_request [operation=DescribeNamespace] temporal_poller_start [namespace=UnitTest|task_queue=WorkflowTest-workflowFailureMetricBenignApplicationError-20c969a7-bd07-49f5-b275-eea4eacb2533|worker_type=WorkflowWorker] temporal_request [namespace=UnitTest|operation=StartWorkflowExecution|task_queue=WorkflowTest-workflowFailureMetricBenignApplicationError-20c969a7-bd07-49f5-b275-eea4eacb2533|workflow_type=ApplicationFailureWorkflow] temporal_request [operation=GetSystemInfo] temporal_long_request [namespace=UnitTest|operation=PollWorkflowTaskQueue|task_queue=WorkflowTest-workflowFailureMetricBenignApplicationError-20c969a7-bd07-49f5-b275-eea4eacb2533|worker_type=WorkflowWorker] at org.junit.Assert.fail(Assert.java:89) at io.temporal.common.reporter.TestStatsReporter.assertCounter(TestStatsReporter.java:53) at io.temporal.common.reporter.TestStatsReporter.assertCounter(TestStatsReporter.java:45) at io.temporal.internal.worker.WorkflowFailedMetricsTests.workflowFailureMetricBenignApplicationError(WorkflowFailedMetricsTests.java:204) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at io.temporal.testing.internal.SDKTestWorkflowRule$1.evaluate(SDKTestWorkflowRule.java:233) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.lang.Thread.run(Thread.java:1583)

Steps to Reproduce the Problem

  1. Run ./gradlew build, or ./gradlew test
Lenguaje dominante
Java
Estrellas
433
Forks
249
Merge medio
6 d 5 h
PR fusionados (30 d)
25

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de temporalio/sdk-java

Todos los issues de temporalio/sdk-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.