Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Tests not passing: TestStatsReporter Flush not flushing

Đang mở
#2,750 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu bằng cách chạy ./gradlew test hoặc ./gradlew build và kiểm tra TestStatsReporter.java, đặc biệt là flush() và assertCounter(), cùng với WorkflowFailedMetricsTests.java. Tái hiện các lỗi trong những phương thức kiểm thử được báo cáo và xác định lý do reporter.flush() không làm cho các metric mong đợi khả dụng. Hoàn thành có nghĩa là các kiểm thử bị ảnh hưởng và clean build đều vượt qua một cách ổn định.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Java
Star
434
Fork
252
Merge trung bình
6 ngày 5 giờ
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của temporalio/sdk-java

Tất cả issue của temporalio/sdk-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.