Skip to content

Commit

Permalink
[type:fix] e2e test error
Browse files Browse the repository at this point in the history
  • Loading branch information
moremind committed Oct 23, 2023
1 parent ea7b6d7 commit d4caaae
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.apache.shenyu.sync.data.http.refresh.DataRefreshFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
Expand All @@ -60,7 +61,7 @@
/**
* HTTP long polling implementation.
*/
public class HttpSyncDataService implements SyncDataService {
public class HttpSyncDataService implements SyncDataService, InitializingBean {

/**
* logger.
Expand Down Expand Up @@ -94,7 +95,6 @@ public HttpSyncDataService(final HttpConfig httpConfig,
this.factory = new DataRefreshFactory(pluginDataSubscriber, metaDataSubscribers, authDataSubscribers, proxySelectorDataSubscribers, discoveryUpstreamDataSubscribers);
this.serverList = Lists.newArrayList(Splitter.on(",").split(httpConfig.getUrl()));
this.restTemplate = restTemplate;
this.start();
}

private void start() {
Expand Down Expand Up @@ -215,7 +215,12 @@ public void close() {
executor = null;
}
}


@Override
public void afterPropertiesSet() throws Exception {
this.start();
}

class HttpLongPollingTask implements Runnable {

private final String server;
Expand Down

0 comments on commit d4caaae

Please sign in to comment.