Skip to content

Commit

Permalink
rework from JUnit4.x to JUnit5.x
Browse files Browse the repository at this point in the history
add partitionId and position as recommended, #285 (review)
  • Loading branch information
nitram509 committed Aug 27, 2021
1 parent b6297aa commit f38ceda
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.zeebe.monitor.repository;

import io.zeebe.monitor.entity.ElementInstanceEntity;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.zeebe.monitor.repository;

import io.zeebe.monitor.entity.VariableEntity;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package io.zeebe.monitor.repository;

import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
import org.springframework.transaction.annotation.Transactional;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@ContextConfiguration(
classes = {TestContextJpaConfiguration.class},
loader = AnnotationConfigContextLoader.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import io.zeebe.monitor.repository.ElementInstanceRepository;
import io.zeebe.monitor.repository.ZeebeRepositoryTest;
import io.zeebe.monitor.zeebe.ZeebeNotificationService;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.messaging.simp.SimpMessagingTemplate;
Expand Down Expand Up @@ -49,6 +49,8 @@ private Schema.ProcessInstanceRecord createElementInstanceWithId(String elementI
return Schema.ProcessInstanceRecord.newBuilder()
.setElementId(elementId)
.setMetadata(Schema.RecordMetadata.newBuilder()
.setPosition(333L)
.setPartitionId(55555)
.setIntent(ProcessInstanceIntent.ELEMENT_ACTIVATED.name()))
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io.zeebe.monitor.entity.VariableEntity;
import io.zeebe.monitor.repository.VariableRepository;
import io.zeebe.monitor.repository.ZeebeRepositoryTest;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

Expand Down

0 comments on commit f38ceda

Please sign in to comment.