|
|
|
@ -21,7 +21,6 @@ import org.junit.After; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.boot.test.mock.mockito.MockBean; |
|
|
|
import org.springframework.data.util.Pair; |
|
|
|
import org.springframework.jdbc.core.JdbcTemplate; |
|
|
|
import org.thingsboard.rule.engine.api.MailService; |
|
|
|
import org.thingsboard.rule.engine.api.notification.SlackService; |
|
|
|
import org.thingsboard.server.common.data.User; |
|
|
|
@ -89,8 +88,6 @@ public abstract class AbstractNotificationApiTest extends AbstractControllerTest |
|
|
|
protected SqlPartitioningRepository partitioningRepository; |
|
|
|
@Autowired |
|
|
|
protected DefaultNotifications defaultNotifications; |
|
|
|
@Autowired |
|
|
|
private JdbcTemplate jdbcTemplate; |
|
|
|
|
|
|
|
public static final String DEFAULT_NOTIFICATION_SUBJECT = "Just a test"; |
|
|
|
public static final NotificationType DEFAULT_NOTIFICATION_TYPE = NotificationType.GENERAL; |
|
|
|
@ -101,7 +98,6 @@ public abstract class AbstractNotificationApiTest extends AbstractControllerTest |
|
|
|
notificationRuleService.deleteNotificationRulesByTenantId(TenantId.SYS_TENANT_ID); |
|
|
|
notificationTemplateService.deleteNotificationTemplatesByTenantId(TenantId.SYS_TENANT_ID); |
|
|
|
notificationTargetService.deleteNotificationTargetsByTenantId(TenantId.SYS_TENANT_ID); |
|
|
|
jdbcTemplate.execute("TRUNCATE TABLE notification"); |
|
|
|
partitioningRepository.cleanupPartitionsCache("notification", Long.MAX_VALUE, 0); |
|
|
|
notificationSettingsService.deleteNotificationSettings(TenantId.SYS_TENANT_ID); |
|
|
|
} |
|
|
|
|