fix_bug: lwm2mClient add to init ObserveAll -> await: object5&object9 cntObserve = 9

This commit is contained in:
nickAS21 2022-08-08 20:52:14 +03:00
parent 76313c0b6b
commit 3fc2ee9e16
3 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ public class OtaLwM2MIntegrationTest extends AbstractOtaLwM2MIntegrationTest {
LwM2MDeviceCredentials deviceCredentials = getDeviceCredentialsNoSec(createNoSecClientCredentials(this.CLIENT_ENDPOINT_OTA5));
final Device device = createDevice(deviceCredentials, this.CLIENT_ENDPOINT_OTA5);
createNewClient(SECURITY_NO_SEC, COAP_CONFIG, false, this.CLIENT_ENDPOINT_OTA5, false, null);
awaitObserveReadAll(0, false, device.getId().getId().toString());
awaitObserveReadAll(9, false, device.getId().getId().toString());
device.setFirmwareId(createFirmware().getId());
final Device savedDevice = doPost("/api/device", device, Device.class);
@ -155,7 +155,7 @@ public class OtaLwM2MIntegrationTest extends AbstractOtaLwM2MIntegrationTest {
LwM2MDeviceCredentials deviceCredentials = getDeviceCredentialsNoSec(createNoSecClientCredentials(this.CLIENT_ENDPOINT_OTA9));
final Device device = createDevice(deviceCredentials, this.CLIENT_ENDPOINT_OTA9);
createNewClient(SECURITY_NO_SEC, COAP_CONFIG, false, this.CLIENT_ENDPOINT_OTA9, false, null);
awaitObserveReadAll(0, false, device.getId().getId().toString());
awaitObserveReadAll(9, false, device.getId().getId().toString());
device.setSoftwareId(createSoftware().getId());
final Device savedDevice = doPost("/api/device", device, Device.class); //sync call

View File

@ -52,7 +52,7 @@ public class LwM2mServerListener {
@Override
public void registered(Registration registration, Registration previousReg,
Collection<Observation> previousObservations) {
log.warn("Client: registered: [{}]", registration.getEndpoint());
log.debug("Client: registered: [{}]", registration.getEndpoint());
service.onRegistered(registration, previousObservations);
}

View File

@ -216,7 +216,7 @@ public class DefaultLwM2mUplinkMsgHandler extends LwM2MExecutorAwareService impl
executor.submit(() -> {
LwM2mClient lwM2MClient = this.clientContext.getClientByEndpoint(registration.getEndpoint());
try {
log.warn("[{}] [{{}] Client: create after Registration", registration.getEndpoint(), registration.getId());
log.debug("[{}] [{{}] Client: create after Registration", registration.getEndpoint(), registration.getId());
Optional<SessionInfoProto> oldSessionInfo = this.clientContext.register(lwM2MClient, registration);
if (oldSessionInfo.isPresent()) {
log.info("[{}] Closing old session: {}", registration.getEndpoint(), new UUID(oldSessionInfo.get().getSessionIdMSB(), oldSessionInfo.get().getSessionIdLSB()));