Bizzare
This commit is contained in:
parent
061e2c7b1f
commit
dbf3aedf5e
|
@ -207,7 +207,7 @@ func TestMessageBusSubscribeWithIndex(t *testing.T) {
|
|||
|
||||
assert.Equal("foo", string((<-msgs).Payload))
|
||||
assert.Equal("bar", string((<-msgs).Payload))
|
||||
//assert.Equal("baz", string((<-msgs).Payload))
|
||||
assert.Equal("baz", string((<-msgs).Payload))
|
||||
}
|
||||
|
||||
func TestMessageBusWAL(t *testing.T) {
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func main() {
|
||||
logsDir, err := os.MkdirTemp("", "*-logs")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(logsDir) // clean up
|
||||
fmt.Printf("logsDir: %s", logsDir)
|
||||
|
||||
// Logs can be cleaned out earlier if needed by searching
|
||||
// for all directories whose suffix ends in *-logs.
|
||||
globPattern := filepath.Join(os.TempDir(), "*-logs")
|
||||
matches, err := filepath.Glob(globPattern)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to match %q: %v", globPattern, err)
|
||||
}
|
||||
|
||||
for _, match := range matches {
|
||||
if err := os.RemoveAll(match); err != nil {
|
||||
log.Printf("Failed to remove %q: %v", match, err)
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue