mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
NOTICK Rename rpc_user
column to started_by
in metadata table (#6081)
This commit is contained in:
parent
ca23612fe1
commit
1c7126afb7
@ -97,7 +97,7 @@ class CordaPersistenceServiceTests {
|
||||
startType = DBCheckpointStorage.StartReason.RPC,
|
||||
launchingCordapp = "this cordapp",
|
||||
platformVersion = PLATFORM_VERSION,
|
||||
rpcUsername = "Batman",
|
||||
startedBy = "Batman",
|
||||
invocationInstant = timestamp,
|
||||
startInstant = timestamp,
|
||||
finishInstant = null
|
||||
|
@ -209,8 +209,8 @@ class DBCheckpointStorage(private val checkpointPerformanceRecorder: CheckpointP
|
||||
@Column(name = "platform_version", nullable = false)
|
||||
var platformVersion: Int,
|
||||
|
||||
@Column(name = "rpc_user", nullable = false)
|
||||
var rpcUsername: String,
|
||||
@Column(name = "started_by", nullable = false)
|
||||
var startedBy: String,
|
||||
|
||||
@Column(name = "invocation_time", nullable = false)
|
||||
var invocationInstant: Instant,
|
||||
@ -236,7 +236,7 @@ class DBCheckpointStorage(private val checkpointPerformanceRecorder: CheckpointP
|
||||
if (!initialParameters.contentEquals(other.initialParameters)) return false
|
||||
if (launchingCordapp != other.launchingCordapp) return false
|
||||
if (platformVersion != other.platformVersion) return false
|
||||
if (rpcUsername != other.rpcUsername) return false
|
||||
if (startedBy != other.startedBy) return false
|
||||
if (invocationInstant != other.invocationInstant) return false
|
||||
if (startInstant != other.startInstant) return false
|
||||
if (finishInstant != other.finishInstant) return false
|
||||
@ -253,7 +253,7 @@ class DBCheckpointStorage(private val checkpointPerformanceRecorder: CheckpointP
|
||||
result = 31 * result + initialParameters.contentHashCode()
|
||||
result = 31 * result + launchingCordapp.hashCode()
|
||||
result = 31 * result + platformVersion
|
||||
result = 31 * result + rpcUsername.hashCode()
|
||||
result = 31 * result + startedBy.hashCode()
|
||||
result = 31 * result + invocationInstant.hashCode()
|
||||
result = 31 * result + startInstant.hashCode()
|
||||
result = 31 * result + (finishInstant?.hashCode() ?: 0)
|
||||
@ -352,7 +352,7 @@ class DBCheckpointStorage(private val checkpointPerformanceRecorder: CheckpointP
|
||||
initialParameters = context.getFlowParameters().storageSerialize().bytes,
|
||||
launchingCordapp = (flowInfo.subFlowVersion as? SubFlowVersion.CorDappFlow)?.corDappName ?: "Core flow",
|
||||
platformVersion = PLATFORM_VERSION,
|
||||
rpcUsername = context.principal().name,
|
||||
startedBy = context.principal().name,
|
||||
invocationInstant = context.trace.invocationId.timestamp,
|
||||
startInstant = Instant.now(),
|
||||
finishInstant = null
|
||||
|
@ -119,7 +119,7 @@
|
||||
<column name="platform_version" type="TINYINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="rpc_user" type="NVARCHAR(128)">
|
||||
<column name="started_by" type="NVARCHAR(128)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="invocation_time" type="java.sql.Types.TIMESTAMP">
|
||||
|
@ -119,7 +119,7 @@
|
||||
<column name="platform_version" type="TINYINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="rpc_user" type="NVARCHAR(128)">
|
||||
<column name="started_by" type="NVARCHAR(128)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="invocation_time" type="java.sql.Types.TIMESTAMP">
|
||||
|
@ -108,7 +108,7 @@ class FlowMetadataRecordingTest {
|
||||
)
|
||||
assertThat(it.launchingCordapp).contains("custom-cordapp")
|
||||
assertEquals(PLATFORM_VERSION, it.platformVersion)
|
||||
assertEquals(user.username, it.rpcUsername)
|
||||
assertEquals(user.username, it.startedBy)
|
||||
assertEquals(context!!.trace.invocationId.timestamp, it.invocationInstant)
|
||||
assertTrue(it.startInstant >= it.invocationInstant)
|
||||
assertNull(it.finishInstant)
|
||||
@ -149,7 +149,7 @@ class FlowMetadataRecordingTest {
|
||||
)
|
||||
assertThat(it.launchingCordapp).contains("custom-cordapp")
|
||||
assertEquals(PLATFORM_VERSION, it.platformVersion)
|
||||
assertEquals(user.username, it.rpcUsername)
|
||||
assertEquals(user.username, it.startedBy)
|
||||
assertEquals(context!!.trace.invocationId.timestamp, it.invocationInstant)
|
||||
assertTrue(it.startInstant >= it.invocationInstant)
|
||||
assertNull(it.finishInstant)
|
||||
@ -247,7 +247,7 @@ class FlowMetadataRecordingTest {
|
||||
)
|
||||
assertThat(it.launchingCordapp).contains("custom-cordapp")
|
||||
assertEquals(6, it.platformVersion)
|
||||
assertEquals(nodeAHandle.nodeInfo.singleIdentity().name.toString(), it.rpcUsername)
|
||||
assertEquals(nodeAHandle.nodeInfo.singleIdentity().name.toString(), it.startedBy)
|
||||
assertEquals(context!!.trace.invocationId.timestamp, it.invocationInstant)
|
||||
assertTrue(it.startInstant >= it.invocationInstant)
|
||||
assertNull(it.finishInstant)
|
||||
@ -293,7 +293,7 @@ class FlowMetadataRecordingTest {
|
||||
)
|
||||
assertThat(it.launchingCordapp).contains("custom-cordapp")
|
||||
assertEquals(PLATFORM_VERSION, it.platformVersion)
|
||||
assertEquals(MyService::class.java.name, it.rpcUsername)
|
||||
assertEquals(MyService::class.java.name, it.startedBy)
|
||||
assertEquals(context!!.trace.invocationId.timestamp, it.invocationInstant)
|
||||
assertTrue(it.startInstant >= it.invocationInstant)
|
||||
assertNull(it.finishInstant)
|
||||
@ -349,7 +349,7 @@ class FlowMetadataRecordingTest {
|
||||
)
|
||||
assertThat(it.launchingCordapp).contains("custom-cordapp")
|
||||
assertEquals(PLATFORM_VERSION, it.platformVersion)
|
||||
assertEquals("Scheduler", it.rpcUsername)
|
||||
assertEquals("Scheduler", it.startedBy)
|
||||
assertEquals(context!!.trace.invocationId.timestamp, it.invocationInstant)
|
||||
assertTrue(it.startInstant >= it.invocationInstant)
|
||||
assertNull(it.finishInstant)
|
||||
|
Loading…
Reference in New Issue
Block a user