Skip to content

Commit

Permalink
chore: upgrade version to 0.14.2 (#2035)
Browse files Browse the repository at this point in the history
* chore: upgrade version to `0.14.2`

* chore: remove TestConcurrentReadWrite test
  • Loading branch information
boojack authored Jul 26, 2023
1 parent d8d6de9 commit 8328b5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 48 deletions.
4 changes: 2 additions & 2 deletions server/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

// Version is the service current released version.
// Semantic versioning: https://semver.org/
var Version = "0.14.1"
var Version = "0.14.2"

// DevVersion is the service current development version.
var DevVersion = "0.14.1"
var DevVersion = "0.14.2"

func GetCurrentVersion(mode string) string {
if mode == "dev" || mode == "demo" {
Expand Down
46 changes: 0 additions & 46 deletions test/store/store_test.go
Original file line number Diff line number Diff line change
@@ -1,47 +1 @@
package teststore

import (
"context"
"fmt"
"sync"
"testing"

"github.com/stretchr/testify/require"
"github.com/usememos/memos/store"
)

func TestConcurrentReadWrite(t *testing.T) {
ctx := context.Background()
ts := NewTestingStore(ctx, t)
user, err := createTestingHostUser(ctx, ts)
require.NoError(t, err)

const numWorkers = 10
const numIterations = 100

wg := sync.WaitGroup{}
wg.Add(numWorkers)

for i := 0; i < numWorkers; i++ {
go func() {
for j := 0; j < numIterations; j++ {
_, err := ts.CreateMemo(ctx, &store.Memo{
CreatorID: user.ID,
Content: fmt.Sprintf("test_content_%d", i),
Visibility: store.Public,
})
require.NoError(t, err)
}
}()

go func() {
_, err := ts.ListMemos(ctx, &store.FindMemo{
CreatorID: &user.ID,
})
require.NoError(t, err)
wg.Done()
}()
}

wg.Wait()
}

0 comments on commit 8328b5d

Please sign in to comment.