-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes for Upgrade tests for systest/21million
- Loading branch information
Showing
14 changed files
with
628 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//go:build integration | ||
|
||
/* | ||
* Copyright 2023 Dgraph Labs, Inc. and Contributors | ||
* | ||
* 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 bulk | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/dgraph-io/dgraph/testutil" | ||
) | ||
|
||
func (bsuite *TOMbulkTestSuite) bulkLoader() error { | ||
rdfFile := filepath.Join(testutil.TestDataDirectory, "21million.rdf.gz") | ||
schemaFile := filepath.Join(testutil.TestDataDirectory, "21million.schema") | ||
require.NoError(bsuite.T(), testutil.MakeDirEmpty([]string{"out/0", "out/1", "out/2"})) | ||
return testutil.BulkLoad(testutil.BulkOpts{ | ||
Zero: testutil.SockAddrZero, | ||
Shards: 1, | ||
RdfFile: rdfFile, | ||
SchemaFile: schemaFile, | ||
}) | ||
} | ||
|
||
func (bsuite *TOMbulkTestSuite) StartAlpha() error { | ||
return testutil.StartAlphas("./alpha.yml") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
//go:build integration | ||
|
||
/* | ||
* Copyright 2023 Dgraph Labs, Inc. and Contributors | ||
* | ||
* 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 bulk | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/suite" | ||
|
||
"github.com/dgraph-io/dgraph/dgraphtest" | ||
"github.com/dgraph-io/dgraph/testutil" | ||
) | ||
|
||
type TOMbulkTestSuite struct { | ||
suite.Suite | ||
dc dgraphtest.Cluster | ||
} | ||
|
||
func (bsuite *TOMbulkTestSuite) SetupTest() { | ||
bsuite.dc = dgraphtest.NewComposeCluster() | ||
} | ||
|
||
func (bsuite *TOMbulkTestSuite) TearDownTest() { | ||
testutil.DetectRaceInAlphas(testutil.DockerPrefix) | ||
} | ||
|
||
func (bsuite *TOMbulkTestSuite) Upgrade() { | ||
// Not implemented for integration tests | ||
} | ||
|
||
func TestTOMbulkTestSuite(t *testing.T) { | ||
suite.Run(t, new(TOMbulkTestSuite)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//go:build upgrade | ||
|
||
/* | ||
* Copyright 2023 Dgraph Labs, Inc. and Contributors | ||
* | ||
* 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 bulk | ||
|
||
import ( | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/dgraph-io/dgraph/dgraphtest" | ||
) | ||
|
||
func (bsuite *TOMbulkTestSuite) bulkLoader() error { | ||
dataDir := os.Getenv("TEST_DATA_DIRECTORY") | ||
rdfFile := filepath.Join(dataDir, "21million.rdf.gz") | ||
schemaFile := filepath.Join(dataDir, "21million.schema") | ||
return bsuite.lc.BulkLoad(dgraphtest.BulkOpts{ | ||
DataFiles: []string{rdfFile}, | ||
SchemaFiles: []string{schemaFile}, | ||
}) | ||
} | ||
|
||
func (lsuite *TOMbulkTestSuite) StartAlpha() error { | ||
c := lsuite.lc | ||
if err := c.Start(); err != nil { | ||
return err | ||
} | ||
return c.HealthCheck(false) | ||
} |
Oops, something went wrong.