You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2018/01/15 19:31:29 UTC
[1/2] storm git commit: [STORM-2894] complete rename of
MultilangEnvirontmentTest to MultilangEnvironmentTest,
and fix typo of Force as Froce
Repository: storm
Updated Branches:
refs/heads/1.x-branch 474b9af67 -> e773a43df
[STORM-2894] complete rename of MultilangEnvirontmentTest to MultilangEnvironmentTest, and fix typo of Force as Froce
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e773a43d
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e773a43d
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e773a43d
Branch: refs/heads/1.x-branch
Commit: e773a43df8062ac8e3dd4c3d3f227f6d728acd2e
Parents: e7ad0a2
Author: Erik Weathers <er...@gmail.com>
Authored: Wed Jan 10 00:09:00 2018 -0800
Committer: Stig Rohde Døssing <sr...@apache.org>
Committed: Mon Jan 15 20:31:15 2018 +0100
----------------------------------------------------------------------
.../apache/storm/flux/multilang/MultilangEnvironmentTest.java | 4 ++--
.../src/test/org/apache/storm/kafka/KafkaUtilsTest.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/e773a43d/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java b/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java
index dcded17..b5a893f 100644
--- a/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java
+++ b/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java
@@ -31,8 +31,8 @@ import static org.junit.Assert.assertEquals;
/**
* Sanity checks to make sure we can at least invoke the shells used.
*/
-public class MultilangEnvirontmentTest {
- private static final Logger LOG = LoggerFactory.getLogger(MultilangEnvirontmentTest.class);
+public class MultilangEnvironmentTest {
+ private static final Logger LOG = LoggerFactory.getLogger(MultilangEnvironmentTest.class);
@Test
public void testInvokePython() throws Exception {
http://git-wip-us.apache.org/repos/asf/storm/blob/e773a43d/external/storm-kafka/src/test/org/apache/storm/kafka/KafkaUtilsTest.java
----------------------------------------------------------------------
diff --git a/external/storm-kafka/src/test/org/apache/storm/kafka/KafkaUtilsTest.java b/external/storm-kafka/src/test/org/apache/storm/kafka/KafkaUtilsTest.java
index 9362f91..6a1534f 100644
--- a/external/storm-kafka/src/test/org/apache/storm/kafka/KafkaUtilsTest.java
+++ b/external/storm-kafka/src/test/org/apache/storm/kafka/KafkaUtilsTest.java
@@ -126,7 +126,7 @@ public class KafkaUtilsTest {
}
@Test
- public void getOffsetFromConfigAndFroceFromStart() {
+ public void getOffsetFromConfigAndForceFromStart() {
config.ignoreZkOffsets = true;
config.startOffsetTime = OffsetRequest.EarliestTime();
createTopicAndSendMessage();
[2/2] storm git commit: [STORM-2894] rename
MultilangEnvirontmentTest.java to MultilangEnvironmentTest.java
Posted by sr...@apache.org.
[STORM-2894] rename MultilangEnvirontmentTest.java to MultilangEnvironmentTest.java
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e7ad0a22
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e7ad0a22
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e7ad0a22
Branch: refs/heads/1.x-branch
Commit: e7ad0a2247d4692102d271369b477a5daa93b309
Parents: 474b9af
Author: Erik Weathers <er...@gmail.com>
Authored: Wed Jan 10 00:08:24 2018 -0800
Committer: Stig Rohde Døssing <sr...@apache.org>
Committed: Mon Jan 15 20:31:15 2018 +0100
----------------------------------------------------------------------
.../multilang/MultilangEnvironmentTest.java | 89 ++++++++++++++++++++
.../multilang/MultilangEnvirontmentTest.java | 89 --------------------
2 files changed, 89 insertions(+), 89 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/e7ad0a22/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java b/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java
new file mode 100644
index 0000000..dcded17
--- /dev/null
+++ b/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvironmentTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.storm.flux.multilang;
+
+
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Sanity checks to make sure we can at least invoke the shells used.
+ */
+public class MultilangEnvirontmentTest {
+ private static final Logger LOG = LoggerFactory.getLogger(MultilangEnvirontmentTest.class);
+
+ @Test
+ public void testInvokePython() throws Exception {
+ String[] command = new String[]{"python", "--version"};
+ int exitVal = invokeCommand(command);
+ assertEquals("Exit value for python is 0.", 0, exitVal);
+ }
+
+ @Test
+ public void testInvokeNode() throws Exception {
+ String[] command = new String[]{"node", "--version"};
+ int exitVal = invokeCommand(command);
+ assertEquals("Exit value for node is 0.", 0, exitVal);
+ }
+
+ private static class StreamRedirect implements Runnable {
+ private InputStream in;
+ private OutputStream out;
+
+ public StreamRedirect(InputStream in, OutputStream out) {
+ this.in = in;
+ this.out = out;
+ }
+
+ @Override
+ public void run() {
+ try {
+ int i = -1;
+ while ((i = this.in.read()) != -1) {
+ out.write(i);
+ }
+ this.in.close();
+ this.out.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private int invokeCommand(String[] args) throws Exception {
+ LOG.debug("Invoking command: {}", args);
+
+ ProcessBuilder pb = new ProcessBuilder(args);
+ pb.redirectErrorStream(true);
+ final Process proc = pb.start();
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Thread t = new Thread(new StreamRedirect(proc.getInputStream(), out));
+ t.start();
+ int exitVal = proc.waitFor();
+ LOG.debug("Command result: {}", out.toString());
+ return exitVal;
+ }
+}
http://git-wip-us.apache.org/repos/asf/storm/blob/e7ad0a22/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvirontmentTest.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvirontmentTest.java b/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvirontmentTest.java
deleted file mode 100644
index dcded17..0000000
--- a/external/flux/flux-core/src/test/java/org/apache/storm/flux/multilang/MultilangEnvirontmentTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.storm.flux.multilang;
-
-
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * Sanity checks to make sure we can at least invoke the shells used.
- */
-public class MultilangEnvirontmentTest {
- private static final Logger LOG = LoggerFactory.getLogger(MultilangEnvirontmentTest.class);
-
- @Test
- public void testInvokePython() throws Exception {
- String[] command = new String[]{"python", "--version"};
- int exitVal = invokeCommand(command);
- assertEquals("Exit value for python is 0.", 0, exitVal);
- }
-
- @Test
- public void testInvokeNode() throws Exception {
- String[] command = new String[]{"node", "--version"};
- int exitVal = invokeCommand(command);
- assertEquals("Exit value for node is 0.", 0, exitVal);
- }
-
- private static class StreamRedirect implements Runnable {
- private InputStream in;
- private OutputStream out;
-
- public StreamRedirect(InputStream in, OutputStream out) {
- this.in = in;
- this.out = out;
- }
-
- @Override
- public void run() {
- try {
- int i = -1;
- while ((i = this.in.read()) != -1) {
- out.write(i);
- }
- this.in.close();
- this.out.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private int invokeCommand(String[] args) throws Exception {
- LOG.debug("Invoking command: {}", args);
-
- ProcessBuilder pb = new ProcessBuilder(args);
- pb.redirectErrorStream(true);
- final Process proc = pb.start();
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Thread t = new Thread(new StreamRedirect(proc.getInputStream(), out));
- t.start();
- int exitVal = proc.waitFor();
- LOG.debug("Command result: {}", out.toString());
- return exitVal;
- }
-}