Skip to content

Commit

Permalink
fix: fix gob encoding (#2639) (#2641)
Browse files Browse the repository at this point in the history
Signed-off-by: Song Gao <[email protected]>
  • Loading branch information
Yisaer authored Feb 23, 2024
1 parent 6f50800 commit 7b5a9bb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions internal/pkg/store/encoding/encoding_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2024 EMQ Technologies Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package encoding

import (
"testing"

"github.com/stretchr/testify/require"
)

func TestEncoding(t *testing.T) {
_, err := Encode([]interface{}{1, nil, "2"})
require.NoError(t, err)
}
1 change: 1 addition & 0 deletions internal/xsql/gob_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ func init() {
gob.Register(make(map[string]interface{}))
gob.Register(make(map[string][]*Tuple))
gob.Register(Tuple{})
gob.Register([]interface{}{})
}

0 comments on commit 7b5a9bb

Please sign in to comment.