Skip to content

Commit

Permalink
fix:Optimize unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
youngzil committed Oct 2, 2024
1 parent e562606 commit cded46c
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ public void testNamespaceNumLimit() {
@Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD)
public void testNamespaceNumLimitFalse() {

ReflectionTestUtils.setField(namespaceService, "bizConfig", bizConfig);
when(bizConfig.namespaceNumLimit()).thenReturn(2);

Namespace namespace = new Namespace();
Expand All @@ -209,7 +208,6 @@ public void testNamespaceNumLimitFalse() {
@Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD)
public void testNamespaceNumLimitWhite() {

ReflectionTestUtils.setField(namespaceService, "bizConfig", bizConfig);
when(bizConfig.isNamespaceNumLimitEnabled()).thenReturn(true);
when(bizConfig.namespaceNumLimit()).thenReturn(2);
when(bizConfig.namespaceNumLimitWhite()).thenReturn(new HashSet<>(Arrays.asList(testApp)));
Expand Down

0 comments on commit cded46c

Please sign in to comment.