Skip to content

Commit

Permalink
Do not wait for async function since async is disabled in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Sep 13, 2023
1 parent 6e60274 commit 916f001
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ void can_publish_node_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -163,7 +162,6 @@ void can_publish_node_with_resource_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -226,7 +224,6 @@ void can_publish_sub_node_with_resource_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -269,7 +266,6 @@ void can_publish_node_tree_with_resources_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -329,7 +325,6 @@ void can_publish_node_tree_with_reused_resource_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -383,7 +378,6 @@ void can_publish_node_in_tree_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -431,9 +425,7 @@ void can_publish_node_tree_with_reused_resource_twice_to_schema() throws Excepti
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
nodeService.publishNode(second.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -494,7 +486,6 @@ void can_publish_reused_resource_with_translations_to_schema() throws Exception
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand All @@ -517,7 +508,6 @@ void can_publish_reused_resource_with_translations_to_schema() throws Exception
TestTransaction.end();

nodeService.publishNode(second.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down Expand Up @@ -574,7 +564,6 @@ void can_publish_node_twice_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand All @@ -595,7 +584,6 @@ void can_publish_node_twice_to_schema() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), false, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(1, TimeUnit.SECONDS);
Expand Down Expand Up @@ -647,7 +635,6 @@ void can_publish_node_tree_to_schema_async() throws Exception {
TestTransaction.end();

nodeService.publishNode(node.getPublicId(), Optional.empty(), target.getPublicId(), true, false);
executor.getThreadPoolExecutor().awaitTermination(6, TimeUnit.SECONDS);

while (!changelogRepository.findAll().isEmpty()) {
executor.getThreadPoolExecutor().awaitTermination(2, TimeUnit.SECONDS);
Expand Down

0 comments on commit 916f001

Please sign in to comment.