This is an automated email from the ASF dual-hosted git repository.
rgoers pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/flume.git
The following commit(s) were added to refs/heads/trunk by this push:
new 650f362b9 fix TestTwitterSource.testCarrotDateFormatBug on different
locale environment
new 65281d3d3 Merge pull request #393 from shalk/fix-FLUME-3445
650f362b9 is described below
commit 650f362b9df9f3d0b318c3c7cfabb28a44cf587f
Author: shalk <[email protected]>
AuthorDate: Wed Feb 1 20:35:28 2023 +0800
fix TestTwitterSource.testCarrotDateFormatBug on different locale
environment
---
.../test/java/org/apache/flume/source/twitter/TestTwitterSource.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/flume-ng-sources/flume-twitter-source/src/test/java/org/apache/flume/source/twitter/TestTwitterSource.java
b/flume-ng-sources/flume-twitter-source/src/test/java/org/apache/flume/source/twitter/TestTwitterSource.java
index 034c2e3ae..4ffe5e218 100644
---
a/flume-ng-sources/flume-twitter-source/src/test/java/org/apache/flume/source/twitter/TestTwitterSource.java
+++
b/flume-ng-sources/flume-twitter-source/src/test/java/org/apache/flume/source/twitter/TestTwitterSource.java
@@ -24,6 +24,7 @@ import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import org.apache.flume.Channel;
@@ -125,7 +126,7 @@ public class TestTwitterSource extends Assert {
@Test
public void testCarrotDateFormatBug() throws Exception {
- SimpleDateFormat formatterFrom = new SimpleDateFormat("EEE MMM dd HH:mm:ss
Z yyyy");
+ SimpleDateFormat formatterFrom = new SimpleDateFormat("EEE MMM dd HH:mm:ss
Z yyyy", Locale.ENGLISH);
formatterFrom.parse("Fri Oct 26 22:53:55 +0000 2012");
}