func runNormalConfigResponse() *httptest.Server {
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		normalConfigCount++
		if normalConfigCount%2 == 0 {
			w.WriteHeader(http.StatusOK)
			w.Write([]byte(configFilesResponseStr))
		} else {
			time.Sleep(500 * time.Microsecond)
			w.WriteHeader(http.StatusNotModified)
		}
	}))
	return ts
}
Normal response
First request will hold 5s and response http.StatusNotModified
Second request will hold 5s and response http.StatusNotModified
Second request will response [{"namespaceName":"application","notificationId":3}]
package remote
import (
	. "github.com/tevid/gohamcrest"
	"github.com/zouyx/agollo/v4/constant"
	"github.com/zouyx/agollo/v4/env"
	"github.com/zouyx/agollo/v4/env/config"
	"github.com/zouyx/agollo/v4/env/server"
	"github.com/zouyx/agollo/v4/extension"
	"github.com/zouyx/agollo/v4/utils/parse/normal"
	"github.com/zouyx/agollo/v4/utils/parse/properties"
	"github.com/zouyx/agollo/v4/utils/parse/yaml"
	"github.com/zouyx/agollo/v4/utils/parse/yml"
	"net/http"
	"net/http/httptest"
	"os"
	"testing"
	"time"
)
var (
	normalConfigCount = 1
	syncApollo        *syncApolloConfig
)
func init() {
	syncApollo = &syncApolloConfig{}
	syncApollo.remoteApollo = syncApollo
	extension.AddFormatParser(constant.DEFAULT, &normal.Parser{})
	extension.AddFormatParser(constant.Properties, &properties.Parser{})
	extension.AddFormatParser(constant.YML, &yml.Parser{})
	extension.AddFormatParser(constant.YAML, &yaml.Parser{})
}