fix bug: lwm2m tests dif Port Comments 1
This commit is contained in:
parent
6c3c9f99b9
commit
934287a380
@ -50,14 +50,12 @@ public abstract class AbstractLwM2MIntegrationDiffPortTest extends AbstractSecur
|
||||
|
||||
doAnswer((invocation) -> {
|
||||
Object[] arguments = invocation.getArguments();
|
||||
log.warn("doAnswer for registrationStoreTest.updateRegistration with args {}", arguments);
|
||||
// if (arguments.length > 0 && arguments[0] instanceof RegistrationUpdate) {
|
||||
log.trace("doAnswer for registrationStoreTest.updateRegistration with args {}", arguments);
|
||||
int portOld = ((RegistrationUpdate) arguments[0]).getPort();
|
||||
int portValueChange = 5;
|
||||
arguments[0] = registrationUpdateNewPort((RegistrationUpdate) arguments[0], portValueChange);
|
||||
int portNew = ((RegistrationUpdate) arguments[0]).getPort();
|
||||
Assert.assertEquals((portNew - portOld), portValueChange);
|
||||
// }
|
||||
return invocation.callRealMethod();
|
||||
}).when(registrationStoreTest).updateRegistration(any(RegistrationUpdate.class));
|
||||
|
||||
|
||||
@ -147,8 +147,7 @@ public class TbInMemoryRegistrationStore implements RegistrationStore, Startable
|
||||
|
||||
@Override
|
||||
public UpdatedRegistration updateRegistration(RegistrationUpdate update) {
|
||||
// test fix bug Diff port
|
||||
log.trace("updateRegistration inMemory {}", update);
|
||||
log.trace("updateRegistration [{}]", update);
|
||||
try {
|
||||
lock.writeLock().lock();
|
||||
|
||||
|
||||
@ -222,8 +222,7 @@ public class TbLwM2mRedisRegistrationStore implements RegistrationStore, Startab
|
||||
|
||||
@Override
|
||||
public UpdatedRegistration updateRegistration(RegistrationUpdate update) {
|
||||
// test fix bug Diff port
|
||||
log.trace("updateRegistration Redis {}", update);
|
||||
log.trace("updateRegistration [{}]", update);
|
||||
Lock lock = null;
|
||||
try (var connection = connectionFactory.getConnection()) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user