mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Try using tmpfs partition
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
b792271af0
commit
85a30deb72
|
@ -14,7 +14,6 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: go test -race -v ./storage/remote/...
|
|
||||||
- run: make promu
|
- run: make promu
|
||||||
- run: make check_license style unused staticcheck build check_assets
|
- run: make check_license style unused staticcheck build check_assets
|
||||||
- run:
|
- run:
|
||||||
|
|
|
@ -9,6 +9,8 @@ go_import_path: github.com/prometheus/prometheus
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- df -h
|
- df -h
|
||||||
- go test -race -v ./storage/remote/...
|
- sudo mkdir /run/tmptest
|
||||||
|
- "sudo chown $(id -u):$(id -g) /run/tmptest"
|
||||||
|
- BASE_TMP_DIR=/run/tmptest go test -race -v ./storage/remote/...
|
||||||
- make check_license style unused test staticcheck check_assets
|
- make check_license style unused test staticcheck check_assets
|
||||||
- git diff --exit-code
|
- git diff --exit-code
|
||||||
|
|
|
@ -32,6 +32,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultRetry = 100 * time.Millisecond
|
var defaultRetry = 100 * time.Millisecond
|
||||||
|
var baseTmpDir = os.Getenv("BASE_TMP_DIR")
|
||||||
|
|
||||||
// retry executes f() n times at each interval until it returns true.
|
// retry executes f() n times at each interval until it returns true.
|
||||||
func retry(t *testing.T, interval time.Duration, n int, f func() bool) {
|
func retry(t *testing.T, interval time.Duration, n int, f func() bool) {
|
||||||
|
@ -109,7 +110,7 @@ func Test_readToEnd_noCheckpoint(t *testing.T) {
|
||||||
const seriesCount = 10
|
const seriesCount = 10
|
||||||
const samplesCount = 250
|
const samplesCount = 250
|
||||||
|
|
||||||
dir, err := ioutil.TempDir("", "readToEnd_noCheckpoint")
|
dir, err := ioutil.TempDir(baseTmpDir, "readToEnd_noCheckpoint")
|
||||||
testutil.Ok(t, err)
|
testutil.Ok(t, err)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
wdir := path.Join(dir, "wal")
|
wdir := path.Join(dir, "wal")
|
||||||
|
@ -172,7 +173,7 @@ func Test_readToEnd_withCheckpoint(t *testing.T) {
|
||||||
const seriesCount = 10
|
const seriesCount = 10
|
||||||
const samplesCount = 250
|
const samplesCount = 250
|
||||||
|
|
||||||
dir, err := ioutil.TempDir("", "readToEnd_withCheckpoint")
|
dir, err := ioutil.TempDir(baseTmpDir, "readToEnd_withCheckpoint")
|
||||||
testutil.Ok(t, err)
|
testutil.Ok(t, err)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
|
@ -255,7 +256,7 @@ func Test_readCheckpoint(t *testing.T) {
|
||||||
const seriesCount = 10
|
const seriesCount = 10
|
||||||
const samplesCount = 250
|
const samplesCount = 250
|
||||||
|
|
||||||
dir, err := ioutil.TempDir("", "readCheckpoint")
|
dir, err := ioutil.TempDir(baseTmpDir, "readCheckpoint")
|
||||||
testutil.Ok(t, err)
|
testutil.Ok(t, err)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
|
@ -317,7 +318,7 @@ func Test_checkpoint_seriesReset(t *testing.T) {
|
||||||
const seriesCount = 10
|
const seriesCount = 10
|
||||||
const samplesCount = 250
|
const samplesCount = 250
|
||||||
|
|
||||||
dir, err := ioutil.TempDir("", "seriesReset")
|
dir, err := ioutil.TempDir(baseTmpDir, "seriesReset")
|
||||||
testutil.Ok(t, err)
|
testutil.Ok(t, err)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
|
@ -382,7 +383,7 @@ func Test_checkpoint_seriesReset(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_decodeRecord(t *testing.T) {
|
func Test_decodeRecord(t *testing.T) {
|
||||||
dir, err := ioutil.TempDir("", "decodeRecord")
|
dir, err := ioutil.TempDir(baseTmpDir, "decodeRecord")
|
||||||
testutil.Ok(t, err)
|
testutil.Ok(t, err)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
|
@ -407,7 +408,7 @@ func Test_decodeRecord(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_decodeRecord_afterStart(t *testing.T) {
|
func Test_decodeRecord_afterStart(t *testing.T) {
|
||||||
dir, err := ioutil.TempDir("", "decodeRecord")
|
dir, err := ioutil.TempDir(baseTmpDir, "decodeRecord")
|
||||||
testutil.Ok(t, err)
|
testutil.Ok(t, err)
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue