org.junit.jupiter.api.condition.EnabledIfSystemProperty Java Examples

The following examples show how to use org.junit.jupiter.api.condition.EnabledIfSystemProperty. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DebeziumSqlserverTest.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@Test
@Order(0)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testReceiveInitCompany() {
    //receive first record (operation r) for the init company - using larger timeout
    Response response = receiveResponse("/receiveAsRecord");

    response.then()
            .statusCode(200);

    Record record = response.getBody().as(Record.class);
    Assert.assertEquals("r", record.getOperation());
    Assert.assertEquals("Struct{NAME=init,CITY=init}", record.getValue());
}
 
Example #2
Source File: DebeziumMysqlTest.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@Test
@Order(0)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testReceiveEmptyMessages() {
    //receive all empty messages before other tests
    receiveResponse("/receiveEmptyMessages")
            .then()
            .statusCode(204);
}
 
Example #3
Source File: DataFlowIT.java    From spring-cloud-dataflow with Apache License 2.0 5 votes vote down vote up
@Test
@EnabledIfSystemProperty(named = "PLATFORM_TYPE", matches = "cloudfoundry")
@DisabledIfSystemProperty(named = "SKIP_CLOUD_CONFIG", matches = "true")
public void streamWithConfigServer() {

	logger.info("stream-server-config-test");

	try (Stream stream = Stream.builder(dataFlowOperations)
			.name("TICKTOCK-config-server")
			.definition("time | log")
			.create()
			.deploy(new DeploymentPropertiesBuilder()
					.putAll(testDeploymentProperties())
					.put("app.log.spring.profiles.active", "test")
					.put("deployer.log.cloudfoundry.services", "cloud-config-server")
					.put("app.log.spring.cloud.config.name", "MY_CONFIG_TICKTOCK_LOG_NAME")
					.build())) {

		Awaitility.await(stream.getName() + " failed to deploy!")
				.until(() -> stream.getStatus().equals(DEPLOYED));

		Awaitility.await().await("Source not started")
				.until(() -> runtimeApps.getFirstInstanceLog(stream, "time")
						.contains("Started TimeSource"));
		Awaitility.await().await("Sink not started")
				.until(() -> runtimeApps.getFirstInstanceLog(stream, "log")
						.contains("Started LogSink"));
		Awaitility.await().await("No output found")
				.until(() -> runtimeApps.getFirstInstanceLog(stream, "log")
						.contains("TICKTOCK CLOUD CONFIG - TIMESTAMP:"));
	}
}
 
Example #4
Source File: DebeziumSqlserverTest.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Test
@Order(1)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testInsert() throws SQLException {
    super.testInsert();
}
 
Example #5
Source File: DebeziumSqlserverTest.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Test
@Order(2)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testUpdate() throws SQLException {
    super.testUpdate();
}
 
Example #6
Source File: DebeziumSqlserverTest.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Test
@Order(3)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testDelete() throws SQLException {
    super.testDelete();
}
 
Example #7
Source File: DebeziumMysqlTest.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Test
@Order(1)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testInsert() throws SQLException {
    super.testInsert();
}
 
Example #8
Source File: DebeziumMysqlTest.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Test
@Order(2)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testUpdate() throws SQLException {
    super.testUpdate();
}
 
Example #9
Source File: DebeziumMysqlTest.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Test
@Order(3)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testDelete() throws SQLException {
    super.testDelete();
}
 
Example #10
Source File: SystemPropertyTestsDemo.java    From spring-boot-tutorial with Creative Commons Attribution Share Alike 4.0 International 4 votes vote down vote up
@Test
@EnabledIfSystemProperty(named = "os.arch", matches = ".*64.*")
void onlyOn64BitArchitectures() {
    // ...
}
 
Example #11
Source File: DllTest.java    From canon-sdk-java with MIT License 4 votes vote down vote up
@Test
@EnabledIfSystemProperty(named = "os.arch", matches = ".*32.*")
void loadLib32() {
    // throws on java 64 bit (win32-x86-64/EDSDK\Dll\EDSDK.dll), not tested with 32 bit runtime
    loadLibraryBasics(DEFAULT_LIB_32_PATH);
}
 
Example #12
Source File: DllTest.java    From canon-sdk-java with MIT License 4 votes vote down vote up
@Test
@EnabledIfSystemProperty(named = "os.arch", matches = ".*64.*")
void loadLib64() {
    // might throw on 32 bit, not tested
    loadLibraryBasics(DEFAULT_LIB_64_PATH);
}
 
Example #13
Source File: DisabledTests.java    From journaldev with MIT License 4 votes vote down vote up
@Test
// My System Properties "user.name" value is "pankaj"
@EnabledIfSystemProperty(named = "user.name", matches = "pankaj")
void test9() {
	assertTrue("pankaj".equals(System.getProperty("user.name")));
}
 
Example #14
Source File: ClientFactoryBuilderTest.java    From armeria with Apache License 2.0 4 votes vote down vote up
@Test
@EnabledIfSystemProperty(named = "com.linecorp.armeria.useJdkDnsResolver", matches = "true")
void useDefaultAddressResolverGroup() {
    final DefaultClientFactory clientFactory = (DefaultClientFactory) ClientFactory.ofDefault();
    assertThat(clientFactory.addressResolverGroup()).isSameAs(DefaultAddressResolverGroup.INSTANCE);
}