Skip to content

Commit

Permalink
DBZ-7698 Improve test naming
Browse files Browse the repository at this point in the history
  • Loading branch information
twthorn committed Mar 29, 2024
1 parent 5d10208 commit 5a02b29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void shouldResetToNewVGgtid() {
}

@Test
public void shouldGetOrderedTransactionContext() {
public void shouldGetVitessTransactionContext() {
VitessConnectorConfig config = new VitessConnectorConfig(
TestHelper.defaultConfig()
.with(VitessConnectorConfig.TRANSACTION_CONTEXT, VitessTransactionContext.class)
Expand All @@ -113,7 +113,7 @@ public void shouldGetOrderedTransactionContext() {
}

@Test
public void shouldGetInitialOrderedTransactionContext() {
public void shouldGetInitialVitessTransactionContext() {
VitessConnectorConfig config = new VitessConnectorConfig(
TestHelper.defaultConfig()
.with(VitessConnectorConfig.TRANSACTION_CONTEXT, VitessTransactionContext.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class VitessEpochProviderTest {
private String txId = prefix + String.join(",", host1Tx2, host2Tx1);
private String txIdShrunk = prefix + String.join(",", host1Tx2);

private String txIdUpgrade = "MySQL82/" + String.join(",", host1Tx2);
private String txIdVersion5 = "MySQL57/" + String.join(",", host1Tx2);
private String txIdVersion8 = "MySQL82/" + String.join(",", host1Tx2);

@Test
public void testGetEpochSameHostSet() {
Expand Down Expand Up @@ -53,9 +54,9 @@ public void testGetEpochDisjointThrowsException() {
}

@Test
public void testGetEpochVersionUpgrade() {
public void testVersionUpgradeDoesNotAffectEpoch() {
VitessEpochProvider provider = new VitessEpochProvider();
Long epoch = provider.getEpoch(0L, previousTxId, txIdUpgrade);
assertThat(epoch).isEqualTo(1);
Long epoch = provider.getEpoch(0L, txIdVersion5, txIdVersion8);
assertThat(epoch).isEqualTo(0L);
}
}

0 comments on commit 5a02b29

Please sign in to comment.