mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
reduce size of KeyReplication test
This test used to be large, because it was testing some features that were refactored out in October of 2019. Since we no longer have the "buffer growth" to check, let's check a much smaller file.
This commit is contained in:
parent
bfea70d5e4
commit
da55aee710
1 changed files with 4 additions and 6 deletions
|
|
@ -246,11 +246,9 @@ func TestImportCommand_KeyReplication(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// create a large import file in order to test the
|
||||
// translateStoreBufferSize growth logic.
|
||||
keyBytes := []byte{}
|
||||
for row := 0; row < 1000; row++ {
|
||||
for col := 0; col < 1000; col++ {
|
||||
for row := 0; row < 50; row++ {
|
||||
for col := 0; col < 50; col++ {
|
||||
x := fmt.Sprintf("foo%d,bar%d\n", row, col)
|
||||
keyBytes = append(keyBytes, x...)
|
||||
}
|
||||
|
|
@ -303,8 +301,8 @@ func TestImportCommand_KeyReplication(t *testing.T) {
|
|||
}
|
||||
|
||||
// Read body and unmarshal response.
|
||||
exp := `{"results":[1000]}` + "\n"
|
||||
if body, err := io.ReadAll(resp.Body); err != nil {
|
||||
exp := `{"results":[50]}` + "\n"
|
||||
if body, err := ioutil.ReadAll(resp.Body); err != nil {
|
||||
return fmt.Errorf("reading: %s", err)
|
||||
} else if !reflect.DeepEqual(body, []byte(exp)) {
|
||||
return fmt.Errorf("expected: %s, but got: %s", exp, body)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue