Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/gradle/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pub mod compile;
pub mod global;
pub mod paths;
pub mod test_filter;

use crate::tracking;
use anyhow::{Context, Result};
Expand Down Expand Up @@ -255,6 +256,7 @@ pub fn filter_gradle_output(raw: &str, task_type: &TaskType) -> String {

match task_type {
TaskType::Compile => compile::filter_compile(&filtered),
TaskType::Test => test_filter::filter_test(&filtered),
TaskType::Generic => filtered,
// Per-task filters added in subsequent PRs
_ => filtered,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
source: src/gradle/test_filter.rs
expression: output
---
com.example.payments.integration.PaymentFlowIntegrationTest > testChargeWithInvalidCard FAILED
org.opentest4j.AssertionFailedError: Expected charge to fail with InvalidCard but got: Success
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:115)
at com.example.payments.integration.helpers.IntegrationAssertions.assertChargeFailure(IntegrationAssertions.kt:28)
at com.example.payments.integration.PaymentFlowIntegrationTest.testChargeWithInvalidCard(PaymentFlowIntegrationTest.kt:95)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.springframework.test.context.junit.jupiter.SpringExtension.interceptTestMethod(SpringExtension.java:215)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
... 6 more
Caused by: com.example.payments.exceptions.PaymentProcessingException: Card validation failed
at com.example.payments.CardValidator.validate(CardValidator.kt:55)
at com.example.payments.ChargeService.charge(ChargeService.kt:32)
at com.example.payments.integration.PaymentFlowIntegrationTest.testChargeWithInvalidCard(PaymentFlowIntegrationTest.kt:90)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.springframework.test.context.junit.jupiter.SpringExtension.interceptTestMethod(SpringExtension.java:215)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
... 10 more


> Task :app-payments:integrationTest FAILED

3 tests completed, 1 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app-payments:integrationTest'.
> There were failing tests. See the report at: file://app-payments/build/reports/tests/integrationTest/index.html

BUILD FAILED in 120s
10 actionable tasks: 1 executed, 9 up-to-date
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
source: src/gradle/test_filter.rs
expression: output
---
com.example.payments.PaymentsServiceTest > testChargeAmount FAILED
java.lang.AssertionError: expected:<100> but was:<50>
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at com.example.payments.helpers.PaymentAssertions.assertChargeAmount(PaymentAssertions.kt:45)
at com.example.payments.PaymentsServiceTest.testChargeAmount(PaymentsServiceTest.kt:33)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:106)
... 7 more

com.example.payments.PaymentsServiceTest > testRefundProcess FAILED
java.lang.IllegalStateException: Refund already processed
at com.example.payments.RefundService.processRefund(RefundService.kt:92)
at com.example.payments.PaymentsServiceTest.testRefundProcess(PaymentsServiceTest.kt:78)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
... 6 more


com.example.orders.OrderServiceTest > testCreateOrder FAILED
java.lang.NullPointerException: Order token is null
at com.example.orders.OrderServiceTest.testCreateOrder(OrderServiceTest.kt:44)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
... 5 more

> Task :backend:app-payments:test FAILED


5 tests completed, 3 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':backend:app-payments:test'.
> There were failing tests. See the report at: file://app-payments/build/reports/tests/test/index.html

BUILD FAILED in 8s
12 actionable tasks: 1 executed, 11 up-to-date
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
source: src/gradle/test_filter.rs
expression: output
---
com.example.payments.PaymentsServiceTest > testChargeAmount FAILED
java.lang.AssertionError: expected:<100> but was:<50>
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at com.example.payments.helpers.PaymentAssertions.assertChargeAmount(PaymentAssertions.kt:45)
at com.example.payments.PaymentsServiceTest.testChargeAmount(PaymentsServiceTest.kt:33)
... 15 more

com.example.payments.PaymentsServiceTest > testRefundProcess FAILED
java.lang.IllegalStateException: Refund already processed
at com.example.payments.RefundService.processRefund(RefundService.kt:92)
at com.example.payments.PaymentsServiceTest.testRefundProcess(PaymentsServiceTest.kt:78)
... 11 more


com.example.orders.OrderServiceTest > testCreateOrder FAILED
java.lang.NullPointerException: Order token is null
at com.example.orders.OrderServiceTest.testCreateOrder(OrderServiceTest.kt:44)
... 8 more

> Task :backend:app-payments:test FAILED


5 tests completed, 3 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':backend:app-payments:test'.
> There were failing tests. See the report at: file://app-payments/build/reports/tests/test/index.html

BUILD FAILED in 8s
12 actionable tasks: 1 executed, 11 up-to-date
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
source: src/gradle/test_filter.rs
expression: output
---
9 tests completed, 0 failed

BUILD SUCCESSFUL in 8s
12 actionable tasks: 1 executed, 11 up-to-date
Loading