Skip to content

Commit 1a679c4

Browse files
Fix expected return types to match scylla's fork behavior
1 parent 480b8b7 commit 1a679c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

integration_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
"errors"
3434
"fmt"
3535
"math/big"
36-
"net"
3736
"reflect"
3837
"strings"
3938
"testing"
@@ -704,11 +703,11 @@ func TestSliceMapMapScanTypes(t *testing.T) {
704703
{"timestamp", "1388534400000", time.Unix(1388534400, 0).UTC(), time.Time{}},
705704
{"uuid", "550e8400-e29b-41d4-a716-446655440000", mustParseUUID("550e8400-e29b-41d4-a716-446655440000"), UUID{}},
706705
{"timeuuid", "60d79c23-5793-11f0-8afe-bcfce78b517a", mustParseUUID("60d79c23-5793-11f0-8afe-bcfce78b517a"), UUID{}},
707-
{"inet", "'127.0.0.1'", net.ParseIP("127.0.0.1").To4(), net.IP(nil)},
706+
{"inet", "'127.0.0.1'", "127.0.0.1", ""},
708707
{"blob", "0x48656c6c6f", []byte("Hello"), []byte(nil)},
709708
{"varint", "123456789012345678901234567890", mustParseBigInt("123456789012345678901234567890"), (*big.Int)(nil)},
710709
{"decimal", "123.45", mustParseDecimal("123.45"), (*inf.Dec)(nil)},
711-
{"date", "'2015-05-03'", time.Date(2015, 5, 3, 0, 0, 0, 0, time.UTC), time.Time{}},
710+
{"date", "'2015-05-03'", time.Date(2015, 5, 3, 0, 0, 0, 0, time.UTC), time.Date(-5877641, 06, 23, 0, 0, 0, 0, time.UTC)},
712711
{"time", "'13:30:54.234'", 13*time.Hour + 30*time.Minute + 54*time.Second + 234*time.Millisecond, time.Duration(0)},
713712
{"duration", "1y2mo3d4h5m6s789ms", mustCreateDuration(14, 3, 4*time.Hour+5*time.Minute+6*time.Second+789*time.Millisecond), Duration{}},
714713
}
@@ -761,12 +760,14 @@ func testSliceMapMapScanSimple(t *testing.T, session *Session, tc SliceMapTypesT
761760

762761
// Helper function to query and extract value using either SliceMap or MapScan
763762
func queryAndExtractValue(t *testing.T, session *Session, colName string, id int, method string) interface{} {
763+
fmt.Println("queryAndExtractValue")
764764
selectQuery := fmt.Sprintf("SELECT %s FROM gocql_test.slicemap_test WHERE id = ?", colName)
765765

766766
switch method {
767767
case "SliceMap":
768768
iter := session.Query(selectQuery, id).Iter()
769769
sliceResults, err := iter.SliceMap()
770+
fmt.Println("Slice results: ", sliceResults[0][colName])
770771
iter.Close()
771772
if err != nil {
772773
t.Fatalf("SliceMap failed: %v", err)

0 commit comments

Comments
 (0)