mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-02 14:03:10 +00:00
chore: waku-go-bindings -> logos-messaging-go-bindings
This commit is contained in:
parent
9a9a9e5c88
commit
3d5e8e550b
@ -5,7 +5,7 @@ Go bindings for the Waku library.
|
|||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
go get -u github.com/waku-org/waku-go-bindings
|
go get -u github.com/logos-messaging/logos-messaging-go-bindings
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/waku-org/waku-go-bindings/utils"
|
"github.com/logos-messaging/logos-messaging-go-bindings/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBasicWakuNodes(t *testing.T) {
|
func TestBasicWakuNodes(t *testing.T) {
|
||||||
@ -29,7 +29,7 @@ func TestBasicWakuNodes(t *testing.T) {
|
|||||||
Debug("TestBasicWakuNodes completed successfully")
|
Debug("TestBasicWakuNodes completed successfully")
|
||||||
}
|
}
|
||||||
|
|
||||||
/* artifact https://github.com/waku-org/waku-go-bindings/issues/40 */
|
/* artifact https://github.com/logos-messaging/logos-messaging-go-bindings/issues/40 */
|
||||||
func TestNodeRestart(t *testing.T) {
|
func TestNodeRestart(t *testing.T) {
|
||||||
t.Skip("Skipping test for open artifact ")
|
t.Skip("Skipping test for open artifact ")
|
||||||
Debug("Starting TestNodeRestart")
|
Debug("Starting TestNodeRestart")
|
||||||
|
|||||||
@ -360,7 +360,7 @@ import (
|
|||||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||||
"github.com/waku-org/go-waku/waku/v2/utils"
|
"github.com/waku-org/go-waku/waku/v2/utils"
|
||||||
|
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const requestTimeout = 30 * time.Second
|
const requestTimeout = 30 * time.Second
|
||||||
|
|||||||
@ -13,11 +13,11 @@ import (
|
|||||||
|
|
||||||
"github.com/cenkalti/backoff/v3"
|
"github.com/cenkalti/backoff/v3"
|
||||||
"github.com/libp2p/go-libp2p/core/peer"
|
"github.com/libp2p/go-libp2p/core/peer"
|
||||||
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
ma "github.com/multiformats/go-multiaddr"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||||
"github.com/waku-org/go-waku/waku/v2/protocol/store"
|
"github.com/waku-org/go-waku/waku/v2/protocol/store"
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// In order to run this test, you must run an nwaku node
|
// In order to run this test, you must run an nwaku node
|
||||||
|
|||||||
@ -16,9 +16,9 @@ import (
|
|||||||
|
|
||||||
"github.com/cenkalti/backoff/v3"
|
"github.com/cenkalti/backoff/v3"
|
||||||
"github.com/libp2p/go-libp2p/core/peer"
|
"github.com/libp2p/go-libp2p/core/peer"
|
||||||
|
"github.com/logos-messaging/logos-messaging-go-bindings/utils"
|
||||||
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||||
"github.com/waku-org/waku-go-bindings/utils"
|
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Test node connect & disconnect peers
|
// Test node connect & disconnect peers
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cenkalti/backoff/v3"
|
"github.com/cenkalti/backoff/v3"
|
||||||
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||||
|
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
|
||||||
|
|
||||||
// "go.uber.org/zap/zapcore"
|
// "go.uber.org/zap/zapcore"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
@ -107,9 +107,9 @@ func TestStressStoreQuery5kMessagesWithPagination(t *testing.T) {
|
|||||||
if i%10 == 0 {
|
if i%10 == 0 {
|
||||||
|
|
||||||
storeQueryRequest := &common.StoreQueryRequest{
|
storeQueryRequest := &common.StoreQueryRequest{
|
||||||
TimeStart: queryTimestamp,
|
TimeStart: queryTimestamp,
|
||||||
IncludeData: true,
|
IncludeData: true,
|
||||||
PaginationLimit: proto.Uint64(50),
|
PaginationLimit: proto.Uint64(50),
|
||||||
PaginationForward: false,
|
PaginationForward: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ func TestStressStoreQuery5kMessagesWithPagination(t *testing.T) {
|
|||||||
require.NoError(t, err, "Failed to query store messages")
|
require.NoError(t, err, "Failed to query store messages")
|
||||||
require.Greater(t, len(*storedmsgs.Messages), 0, "Expected at least one stored message")
|
require.Greater(t, len(*storedmsgs.Messages), 0, "Expected at least one stored message")
|
||||||
}
|
}
|
||||||
Debug("##Iteration #%d",i)
|
Debug("##Iteration #%d", i)
|
||||||
}
|
}
|
||||||
|
|
||||||
captureMemory(t.Name(), "at end")
|
captureMemory(t.Name(), "at end")
|
||||||
@ -145,7 +145,7 @@ func TestStressHighThroughput10kPublish(t *testing.T) {
|
|||||||
captureMemory(t.Name(), "at start")
|
captureMemory(t.Name(), "at start")
|
||||||
|
|
||||||
const totalMessages = 1000
|
const totalMessages = 1000
|
||||||
var pubsubTopic = DefaultPubsubTopic
|
var pubsubTopic = DefaultPubsubTopic
|
||||||
|
|
||||||
for i := 0; i < totalMessages; i++ {
|
for i := 0; i < totalMessages; i++ {
|
||||||
msg := node1.CreateMessage()
|
msg := node1.CreateMessage()
|
||||||
@ -153,17 +153,15 @@ func TestStressHighThroughput10kPublish(t *testing.T) {
|
|||||||
|
|
||||||
hash, err := node1.RelayPublishNoCTX(pubsubTopic, msg)
|
hash, err := node1.RelayPublishNoCTX(pubsubTopic, msg)
|
||||||
require.NoError(t, err, "publish failed @%d", i)
|
require.NoError(t, err, "publish failed @%d", i)
|
||||||
Debug("Iteration-10kpublish #%d",i)
|
Debug("Iteration-10kpublish #%d", i)
|
||||||
err = node2.VerifyMessageReceived(msg, hash )
|
err = node2.VerifyMessageReceived(msg, hash)
|
||||||
require.NoError(t, err, "verification failed @%d", i)
|
require.NoError(t, err, "verification failed @%d", i)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
captureMemory(t.Name(), "at end")
|
captureMemory(t.Name(), "at end")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestStressConnectDisconnect1kIteration(t *testing.T) {
|
func TestStressConnectDisconnect1kIteration(t *testing.T) {
|
||||||
captureMemory(t.Name(), "at start")
|
captureMemory(t.Name(), "at start")
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/waku-org/waku-go-bindings/waku/common"
|
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user