func TestMultiSitesRebuild(t *testing.T) {
// t.Parallel() not supported, see https://github.com/fortytw2/leaktest/issues/4
- defer leaktest.CheckTimeout(t, 30*time.Second)()
-
+ // This leaktest seems to be a little bit shaky on Travis.
+ if !isCI() {
+ defer leaktest.CheckTimeout(t, 30*time.Second)()
+ }
siteConfig := testSiteConfig{Fs: afero.NewMemMapFs(), DefaultContentLanguage: "fr", DefaultContentLanguageInSubdir: true}
sites := createMultiTestSites(t, siteConfig, multiSiteTOMLConfigTemplate)
fs := sites.Fs
writeSource(t, fs, filepath.Join(base, src.Name), string(src.Content))
}
}
+
+func isCI() bool {
+ return os.Getenv("CI") != ""
+}