You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2019/02/17 15:00:50 UTC

[asterixdb] 01/02: [NO ISSUE][TEST] Only use UTF Accept-Charsets

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

mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit ee67a43a1d751de044f7abb28471c1191a1501f3
Author: Michael Blow <mb...@apache.org>
AuthorDate: Sun Feb 17 09:09:31 2019 -0500

    [NO ISSUE][TEST] Only use UTF Accept-Charsets
    
    Fixes intermittent failures when results are not encodable in randomly
    selected Charset (e.g. regex results)
    
    Change-Id: Id1b8ff0761b7f43b611bd23efe28b6408689660c
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/3215
    Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Michael Blow <mb...@apache.org>
    Tested-by: Michael Blow <mb...@apache.org>
---
 .../src/test/java/org/apache/asterix/test/common/TestExecutor.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
index 683d5c8..4129b5a 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
@@ -632,8 +632,10 @@ public class TestExecutor {
                         return next;
                     }
                 }
-                List<Charset> allCharsets = Charset.availableCharsets().values().stream()
-                        .filter(c -> canEncodeDecode(c, "\n\t\\[]{}'\"")).collect(Collectors.toList());
+                List<Charset> allCharsets = Stream
+                        .of("UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "UTF-32BE", "UTF-32LE",
+                                "x-UTF-32BE-BOM", "x-UTF-32LE-BOM", "x-UTF-16LE-BOM")
+                        .filter(Charset::isSupported).map(Charset::forName).collect(Collectors.toList());
                 Collections.shuffle(allCharsets);
                 charsetsRemaining.addAll(allCharsets);
             }