Skip to content

Commit e83883b

Browse files
committed
Updated a couple internal tests.
1 parent 2745459 commit e83883b

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6-
## [Unreleased]
6+
## 1.2.2 - 2021-06-08
77

88
### Added
99
- Added latest Oracle Cloud Infrastructure regions and region codes.

internal/test/nosql_testsuite.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ func (suite *NoSQLTestSuite) ReCreateTable(table, createStmt string, limits *nos
104104
// table names and limits of the tables that are created.
105105
// If the specified namespace nsName is empty, the tables will be created in
106106
// the default namespace.
107-
func (suite *NoSQLTestSuite) CreateTables(numTables int, nsName string) (tables []string, tableLimits []*nosqldb.TableLimits) {
107+
func (suite *NoSQLTestSuite) CreateTables(numTables int, nsName string, offset int) (tables []string, tableLimits []*nosqldb.TableLimits) {
108108
var limits *nosqldb.TableLimits
109109
tables = make([]string, 0, numTables)
110110
tableLimits = make([]*nosqldb.TableLimits, 0, numTables)
111111

112112
for i := 1; i <= numTables; i++ {
113-
tableName := suite.GetNsTableName(nsName, fmt.Sprintf("Test%d", i))
113+
tableName := suite.GetNsTableName(nsName, fmt.Sprintf("Test%d", i+offset))
114114
if suite.IsCloud() {
115115
limits = OkTableLimits
116116
} else {

nosqldb/data_ops_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,11 +940,11 @@ func (suite *DataOpsTestSuite) TestNonNumericDataTypes() {
940940

941941
// int/int64 values are valid for TIMESTAMP data type starting with NoSQL
942942
// Server 20.2.14 on-premise release and Cloud Simulator 1.3.2 release.
943-
if suite.IsOnPrem() && suite.Version >= "20.2.14" || suite.IsCloudSim() && suite.Version >= "1.3.2" {
943+
//if suite.IsOnPrem() && suite.Version >= "20.2.14" || suite.IsCloudSim() && suite.Version >= "1.3.2" {
944944
tsTest.validValues = append(tsTest.validValues, []types.FieldValue{intVal, int64Val}...)
945-
} else {
946-
tsTest.invalidValues = append(tsTest.invalidValues, []types.FieldValue{intVal, int64Val}...)
947-
}
945+
//} else {
946+
//tsTest.invalidValues = append(tsTest.invalidValues, []types.FieldValue{intVal, int64Val}...)
947+
//}
948948

949949
testCases = append(testCases, tsTest)
950950

nosqldb/table_ops_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,10 @@ func (suite *TableOpsTestSuite) TestListTables() {
363363

364364
// Create tables.
365365
if test.IsCloud() {
366-
tableNames, tableLimits = suite.CreateTables(numTables, "")
366+
tableNames, tableLimits = suite.CreateTables(numTables, "", 0)
367367
} else {
368-
tableNames, tableLimits = suite.CreateTables(numTables/2, suite.ns)
369-
names, limits := suite.CreateTables(numTables-len(tableNames), "")
368+
tableNames, tableLimits = suite.CreateTables(numTables/2, suite.ns, 0)
369+
names, limits := suite.CreateTables(numTables-len(tableNames), "", (numTables/2)+1)
370370
tableNames = append(tableNames, names...)
371371
tableLimits = append(tableLimits, limits...)
372372
}
@@ -430,6 +430,9 @@ func (suite *TableOpsTestSuite) TestListTables() {
430430

431431
for _, table := range res.Tables {
432432
returnedTables[table] = true
433+
if testing.Verbose() {
434+
fmt.Printf(" table=%s\n", table)
435+
}
433436
}
434437

435438
req.StartIndex = res.LastIndexReturned

0 commit comments

Comments
 (0)