Skip to content

Commit

Permalink
Deleted unused classes and fixed test in the way that also with alpha…
Browse files Browse the repository at this point in the history
…numeric order ids the test passes
  • Loading branch information
openwms committed May 30, 2023
1 parent 010eaaf commit 090f920
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 57 deletions.
4 changes: 0 additions & 4 deletions src/main/java/org/openwms/wms/order/package-info.java

This file was deleted.

46 changes: 0 additions & 46 deletions src/main/java/org/openwms/wms/receiving/ProcessingException.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.openwms.wms.receiving.impl;

import org.ameba.annotation.TxService;
import org.openwms.wms.receiving.ProcessingException;
import org.openwms.wms.receiving.api.OrderState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -51,7 +50,7 @@ class ReceivingOrderEventListener {
* @param event Expected to keep the created order instance
*/
@TransactionalEventListener
@Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {IllegalArgumentException.class, ProcessingException.class})
@Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {IllegalArgumentException.class})
public void onCreate(ReceivingOrderCreatedEvent event) {
var order = event.getSource();
LOGGER.info("ReceivingOrder with orderId [{}] created", order.getOrderId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.openwms.wms.receiving.impl;

import org.ameba.annotation.TxService;
import org.openwms.wms.receiving.ProcessingException;
import org.openwms.wms.receiving.api.events.ReceivingOrderPositionStateChangeEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -48,7 +47,7 @@ class ReceivingOrderPositionEventListener {
* @param event Expected to store the position as source
*/
@TransactionalEventListener
@Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {IllegalArgumentException.class, ProcessingException.class})
@Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {IllegalArgumentException.class})
public void onStateChange(ReceivingOrderPositionStateChangeEvent event) {
var position = event.getSource();
var order = repository.findBypKey(position.getOrder().getPersistentKey()).orElseThrow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.openwms.common.transport.api.commands.TUCommand;
import org.openwms.common.transport.api.messages.TransportUnitMO;
import org.openwms.common.transport.api.messages.TransportUnitTypeMO;
import org.openwms.wms.receiving.ProcessingException;
import org.openwms.wms.receiving.impl.AbstractReceivingOrderPosition;
import org.openwms.wms.receiving.impl.OrderPositionProcessor;
import org.openwms.wms.receiving.impl.ReceivingOrder;
Expand Down Expand Up @@ -54,7 +53,7 @@ class DefaultOrderPositionProcessor implements OrderPositionProcessor {
*/
@Override
@Measured
@Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {IllegalArgumentException.class, ProcessingException.class})
@Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {IllegalArgumentException.class})
public void processPosition(ReceivingOrder order, AbstractReceivingOrderPosition orderPosition) {
if (orderPosition instanceof ReceivingTransportUnitOrderPosition rtuop) {
var type = TransportUnitTypeMO.newBuilder().type(rtuop.getTransportUnitTypeName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class ReceivingServiceImplIT extends AbstractTestBase {

var order2 = service.createOrder(new ReceivingOrder());
assertThat(order2.getOrderId()).isNotNull();
assertThat(Integer.parseInt(order.getOrderId()) + 1).isEqualTo(Integer.parseInt(order2.getOrderId()));
assertThat(order.getOrderId()).isLessThan(order2.getOrderId());
}

@Sql("classpath:import-TEST.sql")
Expand Down

0 comments on commit 090f920

Please sign in to comment.