This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 10e5746cfe4 Fixed Flaky Test Caused by JSON permutations (#682)
10e5746cfe4 is described below

commit 10e5746cfe46c97690a66effa575c3676cf312be
Author: Bharati Kulkarni <[email protected]>
AuthorDate: Mon Dec 12 00:02:00 2022 -0600

    Fixed Flaky Test Caused by JSON permutations (#682)
    
    * Fixed Flaky Test
    
    * Update indent
---
 .../camel/component/gson/springboot/GsonMarshalExclusionTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java
 
b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java
index 9cffc3ec06f..a7d3f65226a 100644
--- 
a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java
+++ 
b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java
@@ -31,7 +31,6 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import org.junit.jupiter.api.Test;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -79,7 +78,9 @@ public class GsonMarshalExclusionTest {
 
         Object marshalled = template.requestBody("direct:inPojoExcludeWeight", 
in);
         String marshalledAsString = 
context.getTypeConverter().convertTo(String.class, marshalled);
-        assertEquals("{\"age\":30,\"height\":190}", marshalledAsString);
+        assertTrue(marshalledAsString.contains("\"height\":190"));
+        assertTrue(marshalledAsString.contains("\"age\":30"));
+        assertFalse(marshalledAsString.contains("\"weight\":70"));
 
         template.sendBody("direct:backPojoExcludeWeight", marshalled);
 

Reply via email to