timeout 40s /bin/bash -c "while ! httping -qc1 http://somehost:8080/app ; do sleep 1 ; done; echo OK" || echo TIMEOUT
If the service cannot be reached within 40s then TIMEOUT will be printed otherwise OK.
@EnableGateway | |
@SpringBootApplication | |
public class SpringCloudGatewayApplication { | |
private final String cookieName = "beta_active"; | |
private final String headerName = "X-Beta-active"; | |
private final String betaActiveValue = "true"; | |
/** | |
* They're in the beta if they have a cookie or request header set |
package com.example.feed | |
import com.rometools.rome.feed.synd.SyndEntry | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.builder.SpringApplicationBuilder | |
import org.springframework.context.support.beans | |
import org.springframework.core.io.UrlResource | |
import org.springframework.integration.dsl.IntegrationFlows | |
import org.springframework.integration.feed.dsl.Feed | |
import org.springframework.integration.handler.GenericHandler |
timeout 40s /bin/bash -c "while ! httping -qc1 http://somehost:8080/app ; do sleep 1 ; done; echo OK" || echo TIMEOUT
If the service cannot be reached within 40s then TIMEOUT will be printed otherwise OK.