From 118662c54e363d597c51955cef3c5b56b1bd46ba Mon Sep 17 00:00:00 2001 From: Prathyush Reddy Lakkidi Date: Thu, 19 Oct 2023 17:18:08 -0500 Subject: [PATCH 1/4] Fixed flaky test --- core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java b/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java index fab931fc807..9491a5436b8 100644 --- a/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java +++ b/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java @@ -24,6 +24,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.Collections; import java.util.List; import java.util.Optional; @@ -77,6 +78,8 @@ public void testGetFiles() throws URISyntaxException { List foundFiles2 = FileUtils.getFiles(directory, ".*\\.class$"); + Collections.sort(foundFiles); + Collections.sort(foundFiles2); assertEquals(foundFiles, foundFiles2); } } From ffd28bd498b0558131681afe52319f1bf4e5cce5 Mon Sep 17 00:00:00 2001 From: Prathyush Reddy Lakkidi Date: Thu, 2 Nov 2023 15:57:44 -0500 Subject: [PATCH 2/4] Fix flaky test --- .../apache/cxf/javascript/fortest/TestBean1.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java index fe452d19c1d..a1374365801 100644 --- a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java +++ b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java @@ -29,7 +29,21 @@ * Bean with a selection of elements suitable for testing the JavaScript client. */ @XmlRootElement(namespace = "uri:org.apache.cxf.javascript.testns") -@XmlType(namespace = "uri:org.apache.cxf.javascript.testns") +@XmlType(namespace = "uri:org.apache.cxf.javascript.testns", + propOrder = { + "stringItem", + "intItem", + "longItem", + "base64Item", + "optionalIntItem", + "optionalStringItem", + "optionalIntArrayItem", + "doubleItem", + "beanTwoItem", + "beanTwoNotRequiredItem", + "enumeration", + "enum2" + }) public class TestBean1 { public TestBean1() { From 45bb89638d0a9b562973feaef8fa10d8641bc4d0 Mon Sep 17 00:00:00 2001 From: Prathyush Reddy Lakkidi Date: Thu, 2 Nov 2023 16:05:34 -0500 Subject: [PATCH 3/4] remove previous changes --- core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java b/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java index 9491a5436b8..fab931fc807 100644 --- a/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java +++ b/core/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java @@ -24,7 +24,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Collections; import java.util.List; import java.util.Optional; @@ -78,8 +77,6 @@ public void testGetFiles() throws URISyntaxException { List foundFiles2 = FileUtils.getFiles(directory, ".*\\.class$"); - Collections.sort(foundFiles); - Collections.sort(foundFiles2); assertEquals(foundFiles, foundFiles2); } } From 099ecbfe0054ccef583d1e1b4ca6c0b013f85b02 Mon Sep 17 00:00:00 2001 From: Prathyush Reddy Lakkidi Date: Sat, 4 Nov 2023 13:05:05 -0500 Subject: [PATCH 4/4] fixed AttributeTest --- .../apache/cxf/javascript/fortest/AttributeTestBean.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/AttributeTestBean.java b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/AttributeTestBean.java index 648c570cf21..df4db6e61ca 100644 --- a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/AttributeTestBean.java +++ b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/AttributeTestBean.java @@ -28,7 +28,13 @@ * */ @XmlRootElement(namespace = "uri:org.apache.cxf.javascript.testns") -@XmlType(namespace = "uri:org.apache.cxf.javascript.testns") +@XmlType(namespace = "uri:org.apache.cxf.javascript.testns", + propOrder = { + "element1", + "attribute1", + "element2", + "attribute2" + }) public class AttributeTestBean { //CHECKSTYLE:OFF