Examples of ensureReady()


Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    CounterSink counterSink = metrics().newCounterSink();

    stream().create(generateStreamName(), "%s | splitter --expression=payload.split(' ') | %s",
        httpSource, counterSink);

    httpSource.ensureReady().postData("Hello World !");
    assertThat(counterSink, eventually(hasValue("3")));

  }

  @Test
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    stream().create(
        generateStreamName(),
        "%s | aggregator --count=3 --aggregation=T(org.springframework.util.StringUtils).collectionToDelimitedString(#this.![payload],' ') | %s",
        httpSource, fileSink);

    httpSource.ensureReady().postData("Hello").postData("World").postData("!");

    assertThat(fileSink, eventually(hasContentsThat(equalTo("Hello World !"))));

  }
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    stream().create(
        generateStreamName(),
        "%s | aggregator --count=100 --timeout=%d --aggregation=T(org.springframework.util.StringUtils).collectionToDelimitedString(#this.![payload],' ') | %s",
        httpSource, timeout, fileSink);

    httpSource.ensureReady().postData("Hello").postData("World").postData("!");

    // Although the reaper and the task scheduler are both configured with 'timeout',
    // this does not take into account the amount of time it may take to deploy the
    // stream in a distributed environment; therefore this assert will use the default
    // timeouts configured in the eventually/hasContentsThat methods.
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

        generateStreamName(),
        "%s | aggregator --count=3 --aggregation=T(org.springframework.util.StringUtils).collectionToDelimitedString(#this.![payload],' ') "
            + "--correlation=payload.length() | %s",
        httpSource, fileSink);

    httpSource.ensureReady().postData("Hello").postData("World").postData("!");
    httpSource.ensureReady().postData("I").postData("am").postData("1");
    httpSource.ensureReady().postData("tu").postData("es").postData("fifth");

    String expected = "! I 1";
    expected += "am tu es";
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

        "%s | aggregator --count=3 --aggregation=T(org.springframework.util.StringUtils).collectionToDelimitedString(#this.![payload],' ') "
            + "--correlation=payload.length() | %s",
        httpSource, fileSink);

    httpSource.ensureReady().postData("Hello").postData("World").postData("!");
    httpSource.ensureReady().postData("I").postData("am").postData("1");
    httpSource.ensureReady().postData("tu").postData("es").postData("fifth");

    String expected = "! I 1";
    expected += "am tu es";
    expected += "Hello World fifth";
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

            + "--correlation=payload.length() | %s",
        httpSource, fileSink);

    httpSource.ensureReady().postData("Hello").postData("World").postData("!");
    httpSource.ensureReady().postData("I").postData("am").postData("1");
    httpSource.ensureReady().postData("tu").postData("es").postData("fifth");

    String expected = "! I 1";
    expected += "am tu es";
    expected += "Hello World fifth";
    assertThat(fileSink, eventually(hasContentsThat(equalTo(expected))));
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/transform-to-lowercase.groovy' | %s",
        httpSource, fileSink);
    httpSource.ensureReady().postData("HELLO").postData("World").postData("!");
    assertThat(fileSink, eventually(hasContentsThat(equalTo("helloworld!"))));
  }

  @Test
  public void testScriptTransformProcessorWithPropertiesLocation() {
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/script-with-variables.groovy' " +
            "--propertiesLocation='org/springframework/xd/shell/command/script.properties'" +
            " | %s",
        httpSource, fileSink);
    httpSource.ensureReady().postData("hello");
    assertThat(fileSink, eventually(hasContentsThat(equalTo("helloFOO"))));
  }

  @Test
  public void testScriptTransformProcessorWithInlineProperties() {
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/script-with-variables.groovy' " +
            "--variables='foo=FOO'" +
            " | %s",
        httpSource, fileSink);
    httpSource.ensureReady().postData("hello");
    assertThat(fileSink, eventually(hasContentsThat(equalTo("helloFOO"))));
  }

  @Test
  public void testScriptInlinePropertiesOverridesLocation() {
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/script-with-variables.groovy' " +
            "--variables='foo=BAR' --propertiesLocation='org/springframework/xd/shell/command/script.properties'" +
            " | %s",
        httpSource, fileSink);
    httpSource.ensureReady().postData("hello");
    assertThat(fileSink, eventually(hasContentsThat(equalTo("helloBAR"))));
  }

  @Test
  public void testExpressionTransformProcessor() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.