@@ -31,7 +31,7 @@ test('Verify that user can open new Slow Log page using new icon on left app pan
31
31
// Verify that user see "Slow Log" page by default for non OSS Cluster
32
32
await t . expect ( overviewPage . overviewTab . withAttribute ( 'aria-selected' , 'true' ) . exists ) . notOk ( 'The Overview tab is displayed for non OSS Cluster db' ) ;
33
33
// Verify that user can configure slowlog-max-len for Slow Log and see whole set of commands according to the setting
34
- await slowLogPage . changeSlowerThanParameter ( slowerThanParameter ) ;
34
+ await slowLogPage . changeSlowerThanParameter ( slowerThanParameter , slowLogPage . slowLogConfigureMicroSecondsUnit ) ;
35
35
await slowLogPage . Cli . sendCommandInCli ( command ) ;
36
36
await t . click ( slowLogPage . slowLogRefreshButton ) ;
37
37
const duration = await slowLogPage . slowLogCommandValue . withExactText ( command ) . parent ( 3 ) . find ( slowLogPage . cssSelectorDurationValue ) . textContent ;
@@ -50,21 +50,21 @@ test('Verify that user can see "No Slow Logs found" message when slowlog-max-len
50
50
await t . expect ( slowLogPage . slowLogEmptyResult . exists ) . ok ( 'Empty results not found' ) ;
51
51
// Verify that user can see not more that number of commands that was specified in configuration
52
52
maxCommandLength = 30 ;
53
- await slowLogPage . changeSlowerThanParameter ( slowerThanParameter ) ;
53
+ await slowLogPage . changeSlowerThanParameter ( slowerThanParameter , slowLogPage . slowLogConfigureMicroSecondsUnit ) ;
54
54
await slowLogPage . changeMaxLengthParameter ( maxCommandLength ) ;
55
55
// Go to Browser page to scan keys and turn back
56
56
await t . click ( myRedisDatabasePage . NavigationPanel . browserButton ) ;
57
57
await t . click ( browserPage . refreshKeysButton ) ;
58
58
await t . click ( myRedisDatabasePage . NavigationPanel . analysisPageButton ) ;
59
59
await t . click ( slowLogPage . slowLogTab ) ;
60
60
// Compare number of logged commands with maxLength
61
- await t . expect ( slowLogPage . slowLogCommandStatistics . withText ( `${ maxCommandLength } entries` ) . exists ) . ok ( ' Number of displayed commands is less than ' ) ;
61
+ await t . expect ( slowLogPage . slowLogCommandStatistics . withText ( `${ maxCommandLength } entries` ) . exists ) . ok ( ` Number of displayed commands is less than selected ${ maxCommandLength } ` ) ;
62
62
} ) ;
63
63
test ( 'Verify that users can specify number of commands that they want to display (10, 25, 50, 100, Max) in Slow Log' , async t => {
64
64
maxCommandLength = 128 ;
65
65
const numberOfCommandsArray = [ 10 , 25 , 50 , 100 , - 1 ] ;
66
66
// Change slower-than parameter
67
- await slowLogPage . changeSlowerThanParameter ( slowerThanParameter ) ;
67
+ await slowLogPage . changeSlowerThanParameter ( slowerThanParameter , slowLogPage . slowLogConfigureMicroSecondsUnit ) ;
68
68
await slowLogPage . changeMaxLengthParameter ( maxCommandLength ) ;
69
69
// Go to Browser page to scan keys and turn back
70
70
await t . click ( myRedisDatabasePage . NavigationPanel . browserButton ) ;
@@ -83,7 +83,7 @@ test('Verify that users can specify number of commands that they want to display
83
83
} ) ;
84
84
test ( 'Verify that user can set slowlog-log-slower-than value in milliseconds and command duration will be re-calculated to ms' , async t => {
85
85
// Set slower than parameter to log commands
86
- await slowLogPage . changeSlowerThanParameter ( slowerThanParameter ) ;
86
+ await slowLogPage . changeSlowerThanParameter ( slowerThanParameter , slowLogPage . slowLogConfigureMicroSecondsUnit ) ;
87
87
// Send command in microseconds
88
88
command = 'scan 0 MATCH * COUNT 5000' ;
89
89
await slowLogPage . Cli . sendCommandInCli ( command ) ;
@@ -111,7 +111,7 @@ test('Verify that user can set slowlog-log-slower-than value in milliseconds and
111
111
test ( 'Verify that user can reset settings to default on Slow Log page' , async t => {
112
112
// Set slowlog-max-len=0
113
113
command = 'info' ;
114
- await slowLogPage . changeSlowerThanParameter ( slowerThanParameter ) ;
114
+ await slowLogPage . changeSlowerThanParameter ( slowerThanParameter , slowLogPage . slowLogConfigureMicroSecondsUnit ) ;
115
115
await slowLogPage . Cli . sendCommandInCli ( 'info' ) ;
116
116
await t . click ( slowLogPage . slowLogRefreshButton ) ;
117
117
await t . expect ( slowLogPage . slowLogCommandValue . withExactText ( command ) . exists ) . ok ( 'Logged command not found' ) ;
@@ -121,11 +121,11 @@ test('Verify that user can reset settings to default on Slow Log page', async t
121
121
await t . expect ( slowLogPage . slowLogEmptyResult . exists ) . ok ( 'Slow log is not cleared' ) ;
122
122
123
123
// Set slower than parameter and max length
124
- await slowLogPage . changeSlowerThanParameter ( slowerThanParameter ) ;
124
+ await slowLogPage . changeSlowerThanParameter ( slowerThanParameter , slowLogPage . slowLogConfigureMicroSecondsUnit ) ;
125
125
await slowLogPage . changeMaxLengthParameter ( maxCommandLength ) ;
126
126
// Reset settings to default
127
127
await slowLogPage . resetToDefaultConfig ( ) ;
128
128
// Compare configuration after re-setting
129
129
const configText = await slowLogPage . configInfo . textContent ;
130
- await t . expect ( configText . replace ( / \u00a0 / g, ' ' ) ) . contains ( 'Execution time: 10 000 µs , Max length: 128' , 'Not reset configuration' ) ;
130
+ await t . expect ( configText . replace ( / \u00a0 / g, ' ' ) ) . contains ( 'Execution time: 10 msec , Max length: 128' , 'Not reset configuration' ) ;
131
131
} ) ;
0 commit comments