Package org.springframework.boot

Examples of org.springframework.boot.SpringApplication


public class YarnContainerClusterApplicationOperationPropertiesTests {

  @Test
  public void testProjectionDataProperties() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app.run(new String[] {
        "--spring.yarn.internal.ContainerClusterApplication.projectionDataAny=1",
        "--spring.yarn.internal.ContainerClusterApplication.projectionDataHosts.host1=1",
        "--spring.yarn.internal.ContainerClusterApplication.projectionDataRacks.rack1=1",
        "--spring.yarn.internal.ContainerClusterApplication.projectionDataHosts.host2=2",
        "--spring.yarn.internal.ContainerClusterApplication.projectionDataRacks.rack2=2" });
View Full Code Here


*/
public class SpringYarnBatchPropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnBatchPropertiesTests" });
    SpringYarnBatchProperties properties = context.getBean(SpringYarnBatchProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.isEnabled(), is(true));
    assertThat(properties.getName(), is("nameFoo1"));
View Full Code Here

public class SpringYarnClientLaunchContextPropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnClientLaunchContextPropertiesTests" });
    SpringYarnClientLaunchContextProperties properties = context.getBean(SpringYarnClientLaunchContextProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.getArchiveFile(), is("archiveFileFoo"));
View Full Code Here

*/
public class SpringYarnPropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnPropertiesTests" });
    SpringYarnProperties properties = context.getBean(SpringYarnProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.getApplicationDir(), is("applicationDirFoo"));
    assertThat(properties.getApplicationBaseDir(), is("applicationBaseDirFoo"));
View Full Code Here

public class SpringYarnClientLocalizerPropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnClientLocalizerPropertiesTests" });
    SpringYarnClientLocalizerProperties properties = context.getBean(SpringYarnClientLocalizerProperties.class);
    assertThat(properties, notNullValue());

    List<String> pattern = properties.getPatterns();
View Full Code Here

    p.put("spring.yarn.client.localizer.rawFileContents." + SpringYarnBootUtils.escapeConfigKey("file1"), new byte[1]);
    p.put("spring.yarn.client.localizer.rawFileContents." + SpringYarnBootUtils.escapeConfigKey("file2"), new byte[2]);
    p.put("spring.yarn.client.localizer.rawFileContents." + SpringYarnBootUtils.escapeConfigKey("application.properties"), new byte[3]);
    builder.properties(p);

    SpringApplication app = builder.application();
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app.run(new String[0]);
    SpringYarnClientLocalizerProperties properties = context.getBean(SpringYarnClientLocalizerProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.getRawFileContents(), notNullValue());
    assertThat(properties.getRawFileContents().size(), is(3));
    assertThat(properties.getRawFileContents().get(SpringYarnBootUtils.escapeConfigKey("file1")).length, is(1));
View Full Code Here

public class SpringYarnAppmasterLaunchContextPropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnAppmasterLaunchContextPropertiesTests" });
    SpringYarnAppmasterLaunchContextProperties properties = context.getBean(SpringYarnAppmasterLaunchContextProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.getArchiveFile(), is("archiveFileFoo"));
View Full Code Here

*/
public class SpringYarnContainerPropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnContainerPropertiesTests" });
    SpringYarnContainerProperties properties = context.getBean(SpringYarnContainerProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.isKeepContextAlive(), is(false));
    assertThat(properties.getContainerClass(), is("containerClassFoo"));
View Full Code Here

public class SpringYarnAppmasterResourcePropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnAppmasterResourcePropertiesTests" });
    SpringYarnAppmasterResourceProperties properties = context.getBean(SpringYarnAppmasterResourceProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.getPriority(), is(234));
    assertThat(properties.getMemory(), is("memoryFoo"));
View Full Code Here

*/
public class SpringYarnAppmasterPropertiesTests {

  @Test
  public void testAllPropertiesSet() {
    SpringApplication app = new SpringApplication(TestConfiguration.class);
    app.setWebEnvironment(false);
    ConfigurableApplicationContext context = app
        .run(new String[] { "--spring.config.name=SpringYarnAppmasterPropertiesTests" });
    SpringYarnAppmasterProperties properties = context.getBean(SpringYarnAppmasterProperties.class);
    assertThat(properties, notNullValue());
    assertThat(properties.getAppmasterClass(), is("appmasterClassFoo"));
    assertThat(properties.getContainerCount(), is(123));
View Full Code Here

TOP

Related Classes of org.springframework.boot.SpringApplication

Copyright © 2018 www.massapicom. 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.