Skip to content

Commit

Permalink
fix bad change
Browse files Browse the repository at this point in the history
  • Loading branch information
vraybaud committed Jun 9, 2020
1 parent 85247f2 commit 4801b5a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ To format the code, we use Intellij built-in formatter with settings that can be

Import settings with `File/Manage IDE Settings/Import Settings...`.

You can use plugins like `Save Actions` (https://plugins.jetbrains.com/plugin/7642-save-actions) that applies changed code refactoring and optimized imports on a save.
You can use plugins like [Save Actions](https://plugins.jetbrains.com/plugin/7642-save-actions) that applies changed code refactoring and optimized imports on a save.

### Working locally with Docker images

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,14 @@ class EntityOperationService(
}.collect(
{ BatchOperationResult() },
{ batchOperationResult, updateResult ->
updateResult.fold({
batchOperationResult.errors.add(it)
}, {
batchOperationResult.success.add(it)
})
updateResult.fold(
{
batchOperationResult.errors.add(it)
},
{
batchOperationResult.success.add(it)
}
)
},
BatchOperationResult::plusAssign
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ class EntityHandlerTests {
.header("Link", "<$aquacContext>; rel=http://www.w3.org/ns/json-ld#context; type=application/ld+json")
.bodyValue(jsonLdFile)
.exchange()
.expectStatus().isEqualTo(HttpStatus.NO_CONTENT)
.expectStatus().isEqualTo(HttpStatus.MULTI_STATUS)

verify { entityService.exists(eq("urn:ngsi-ld:DeadFishes:019BN")) }
verify { entityService.updateEntityAttributes(eq(entityId), any(), eq(aquacContext!!)) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import org.springframework.web.bind.annotation.RestController
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
import reactor.kotlin.core.publisher.toMono
import java.lang.IllegalArgumentException
import java.util.Optional

@RestController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class TemporalEntityHandlerTests {
)
}
verify {
attributeInstanceService.addAttributeInstances(eq(temporalEntityAttributeUuid),
attributeInstanceService.addAttributeInstances(
eq(temporalEntityAttributeUuid),
eq("incoming"),
match {
it.size == 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,18 @@ class SubscriptionService(
val value = it.value.toSqlValue(it.key)

val updateStatement = Update.update(columnName, value)
updates.add(databaseClient.update()
.table("subscription")
.using(updateStatement)
.matching(Criteria.where("id").`is`(subscriptionId))
.fetch()
.rowsUpdated()
.doOnError { e ->
throw BadRequestDataException(e.message ?: "Could not update attribute ${it.key}")
}
updates.add(
databaseClient.update()
.table("subscription")
.using(updateStatement)
.matching(Criteria.where("id").`is`(subscriptionId))
.fetch()
.rowsUpdated()
.doOnError { e ->
throw BadRequestDataException(
e.message ?: "Could not update attribute ${it.key}"
)
}
)
}
}
Expand Down

0 comments on commit 4801b5a

Please sign in to comment.