mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-17 03:45:41 -06:00
refactor(test): remove redundant beginTableCalled variable
Remove standalone beginTableCalled variable in TestLazyRowWriter_NoRowsWritten test function. The test now uses mockDW.beginTableCalled directly, which maintains consistency with other test functions (TestLazyRowWriter_RowsWritten and TestLazyRowWriter_CombinedRowsWritten) that already follow this pattern.
This commit is contained in:
@@ -402,9 +402,7 @@ func TestLazyRowWriter_NoRowsWritten(t *testing.T) {
|
||||
mockDW := &mockDiffWriter{}
|
||||
realWriter := &mockRowWriter{}
|
||||
|
||||
beginTableCalled := false
|
||||
onFirstWrite := func() error {
|
||||
beginTableCalled = true
|
||||
return mockDW.BeginTable("fromTable", "toTable", false, false)
|
||||
}
|
||||
|
||||
@@ -417,7 +415,7 @@ func TestLazyRowWriter_NoRowsWritten(t *testing.T) {
|
||||
}
|
||||
|
||||
// BeginTable should NEVER have been called
|
||||
if beginTableCalled {
|
||||
if mockDW.beginTableCalled {
|
||||
t.Error("BeginTable() was called even though no rows were written - should have been lazy!")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user