Merge "Added support for using oauth token for Kafka"
[nonrtric/plt/ranpm.git] / pmproducer / src / test / java / org / oran / pmproducer / ApplicationTest.java
index 095a96c..04e8eed 100644 (file)
@@ -252,9 +252,10 @@ class ApplicationTest {
     }
 
     private void waitForRegistration() {
+        producerRegistrationTask.registerTypesAndProducer().block();
         // Register producer, Register types
         await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
-        producerRegistrationTask.supervisionTask().block();
+        producerRegistrationTask.registerTypesAndProducer().block();
 
         assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
         assertThat(producerRegistrationTask.isRegisteredInIcs()).isTrue();
@@ -424,23 +425,6 @@ class ApplicationTest {
         await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
     }
 
-    @Test
-    void testReRegister() throws Exception {
-        // Wait foir register types and producer
-        waitForRegistration();
-
-        // Clear the registration, should trigger a re-register
-        icsSimulatorController.testResults.reset();
-        producerRegistrationTask.supervisionTask().block();
-        await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
-        assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
-
-        // Just clear the registerred types, should trigger a re-register
-        icsSimulatorController.testResults.types.clear();
-        await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds)
-                .hasSize(this.types.size()));
-    }
-
     @Test
     @SuppressWarnings("squid:S2925") // "Thread.sleep" should not be used in tests.
     void testZZActuator() throws Exception {