Skip to content

Commit

Permalink
remove duplicate file
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Nov 18, 2024
1 parent c243e2d commit 3bba1a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Licensed under MIT License Copyright (c) 2021-2024 Raja Kolli.

import com.example.inventoryservice.config.NonSQLContainersConfig;
import com.example.inventoryservice.config.TestStockOrderListenerConfig;
import com.example.inventoryservice.repositories.InventoryJOOQRepository;
import com.example.inventoryservice.repositories.InventoryRepository;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -24,9 +25,9 @@ Licensed under MIT License Copyright (c) 2021-2024 Raja Kolli.
@SpringBootTest(
webEnvironment = RANDOM_PORT,
classes = {
SQLContainersConfig.class,
TestStockOrderListenerConfig.class,
NonSQLContainersConfig.class,
TestStockOrderListenerConfig.class
SQLContainersConfig.class
})
@AutoConfigureMockMvc
public abstract class AbstractIntegrationTest {
Expand All @@ -37,6 +38,8 @@ public abstract class AbstractIntegrationTest {

@Autowired protected KafkaTemplate<Long, Object> kafkaTemplate;

@Autowired protected InventoryJOOQRepository inventoryJOOQRepository;

@Autowired protected InventoryRepository inventoryRepository;

@Autowired protected TestStockOrderListenerConfig stockOrderListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class KafkaListenerConfigIntTest extends AbstractIntegrationTest {

@Test
void onNewOrderEvent() {
inventoryRepository.deleteByProductCode("JUNIT_000");
inventoryJOOQRepository.deleteByProductCode("JUNIT_000");
// Create inventory ensuring quantity is available
Inventory inventory =
inventoryRepository.save(
Expand All @@ -34,7 +34,7 @@ void onNewOrderEvent() {
await().untilAsserted(
() -> {
Optional<Inventory> optionalInventory =
inventoryRepository.findById(inventory.getId());
inventoryJOOQRepository.findById(inventory.getId());
assertThat(optionalInventory).isPresent();
Inventory inventoryFromDB = optionalInventory.get();
assertThat(inventoryFromDB)
Expand Down

This file was deleted.

0 comments on commit 3bba1a2

Please sign in to comment.