You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metron.apache.org by Otto Fowler <ot...@gmail.com> on 2016/11/10 15:50:34 UTC

ShellFunctions tests and Editor

I’m seeing my test runs hang since I set my $EDITOR explicitly to vim.

@Test
public void testEdit() throws Exception {
  System.getProperties().put("EDITOR", "/bin/cat");
  Object out = StellarTest.run("TO_UPPER(SHELL_EDIT(foo))",
ImmutableMap.of("foo", "foo"), context);
  Assert.assertEquals("FOO", out);
}


Seems to be hanging with output like

Running org.apache.metron.management.ShellFunctionsTest

Vim: Warning: Output is not to a terminal

Vim: Warning: Input is not from a terminal




Has anyone else seen this?

Re: ShellFunctions tests and Editor

Posted by Casey Stella <ce...@gmail.com>.
Cool, thanks!  As a workaround, by the way, you could use env -u EDITOR mvn
clean install


On Thu, Nov 10, 2016 at 11:13 AM, Otto Fowler <ot...@gmail.com>
wrote:

> METRON-561
>
>
> On November 10, 2016 at 10:55:24, Casey Stella (cestella@gmail.com) wrote:
>
> oh, that's a bug, for sure. In the ShellFunctions Edit class, we should
> probably check the java property first and then the environment variable.
> That should fix it. Please make a JIRA for it, if you haven't already.
>
> Casey
>
> On Thu, Nov 10, 2016 at 10:50 AM, Otto Fowler <ot...@gmail.com>
> wrote:
>
> > I’m seeing my test runs hang since I set my $EDITOR explicitly to vim.
> >
> > @Test
> > public void testEdit() throws Exception {
> > System.getProperties().put("EDITOR", "/bin/cat");
> > Object out = StellarTest.run("TO_UPPER(SHELL_EDIT(foo))",
> > ImmutableMap.of("foo", "foo"), context);
> > Assert.assertEquals("FOO", out);
> > }
> >
> >
> > Seems to be hanging with output like
> >
> > Running org.apache.metron.management.ShellFunctionsTest
> >
> > Vim: Warning: Output is not to a terminal
> >
> > Vim: Warning: Input is not from a terminal
> >
> >
> >
> >
> > Has anyone else seen this?
> >
>
>

Re: ShellFunctions tests and Editor

Posted by Otto Fowler <ot...@gmail.com>.
METRON-561


On November 10, 2016 at 10:55:24, Casey Stella (cestella@gmail.com) wrote:

oh, that's a bug, for sure. In the ShellFunctions Edit class, we should
probably check the java property first and then the environment variable.
That should fix it. Please make a JIRA for it, if you haven't already.

Casey

On Thu, Nov 10, 2016 at 10:50 AM, Otto Fowler <ot...@gmail.com>
wrote:

> I’m seeing my test runs hang since I set my $EDITOR explicitly to vim.
>
> @Test
> public void testEdit() throws Exception {
> System.getProperties().put("EDITOR", "/bin/cat");
> Object out = StellarTest.run("TO_UPPER(SHELL_EDIT(foo))",
> ImmutableMap.of("foo", "foo"), context);
> Assert.assertEquals("FOO", out);
> }
>
>
> Seems to be hanging with output like
>
> Running org.apache.metron.management.ShellFunctionsTest
>
> Vim: Warning: Output is not to a terminal
>
> Vim: Warning: Input is not from a terminal
>
>
>
>
> Has anyone else seen this?
>

Re: ShellFunctions tests and Editor

Posted by Casey Stella <ce...@gmail.com>.
oh, that's a bug, for sure.  In the ShellFunctions Edit class, we should
probably check the java property first and then the environment variable.
That should fix it.  Please make a JIRA for it, if you haven't already.

Casey

On Thu, Nov 10, 2016 at 10:50 AM, Otto Fowler <ot...@gmail.com>
wrote:

> I’m seeing my test runs hang since I set my $EDITOR explicitly to vim.
>
> @Test
> public void testEdit() throws Exception {
>   System.getProperties().put("EDITOR", "/bin/cat");
>   Object out = StellarTest.run("TO_UPPER(SHELL_EDIT(foo))",
> ImmutableMap.of("foo", "foo"), context);
>   Assert.assertEquals("FOO", out);
> }
>
>
> Seems to be hanging with output like
>
> Running org.apache.metron.management.ShellFunctionsTest
>
> Vim: Warning: Output is not to a terminal
>
> Vim: Warning: Input is not from a terminal
>
>
>
>
> Has anyone else seen this?
>