File tree 4 files changed +20
-5
lines changed
src/org/openqa/selenium/grid
test/org/openqa/selenium/grid
4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,8 @@ public boolean equals(Object o) {
214
214
return Objects .equals (this .nodeId , that .nodeId )
215
215
&& Objects .equals (this .externalUri , that .externalUri )
216
216
&& this .maxSessionCount == that .maxSessionCount
217
- && this .sessionTimeout == that .sessionTimeout
217
+ && this .sessionTimeout .compareTo (that .sessionTimeout ) == 0
218
+ && this .heartbeatPeriod .compareTo (that .heartbeatPeriod ) == 0
218
219
&& Objects .equals (this .slots , that .slots )
219
220
&& Objects .equals (this .availability , that .availability )
220
221
&& Objects .equals (this .version , that .version );
Original file line number Diff line number Diff line change @@ -135,7 +135,19 @@ public HttpResponse execute(HttpRequest req) {
135
135
136
136
List <Map <String , Object >> nodeResults =
137
137
status .getNodes ().stream ()
138
- .map (node -> new ImmutableMap .Builder <String , Object >().putAll (node .toJson ()).build ())
138
+ .map (
139
+ node ->
140
+ new ImmutableMap .Builder <String , Object >()
141
+ .put ("id" , node .getNodeId ())
142
+ .put ("uri" , node .getExternalUri ())
143
+ .put ("maxSessions" , node .getMaxSessionCount ())
144
+ .put ("sessionTimeout" , node .getSessionTimeout ().toMillis ())
145
+ .put ("osInfo" , node .getOsInfo ())
146
+ .put ("heartbeatPeriod" , node .getHeartbeatPeriod ().toMillis ())
147
+ .put ("availability" , node .getAvailability ())
148
+ .put ("version" , node .getVersion ())
149
+ .put ("slots" , node .getSlots ())
150
+ .build ())
139
151
.collect (toList ());
140
152
141
153
ImmutableMap .Builder <String , Object > value = ImmutableMap .builder ();
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ public void setUp() throws URISyntaxException {
103
103
.add (caps , new TestSessionFactory ((id , c ) -> new Handler (c )))
104
104
.maximumConcurrentSessions (2 )
105
105
.sessionTimeout (Duration .ofSeconds (30 ))
106
+ .heartbeatPeriod (Duration .ofSeconds (5 ))
106
107
.build ();
107
108
108
109
wait =
@@ -145,6 +146,7 @@ void testAddNodeToDistributor() {
145
146
assertThat (distributorNode .getNodeId ()).isEqualByComparingTo (localNode .getId ());
146
147
assertThat (distributorNode .getExternalUri ()).isEqualTo (uri );
147
148
assertThat (distributorNode .getSessionTimeout ()).isEqualTo (Duration .ofSeconds (30 ));
149
+ assertThat (distributorNode .getHeartbeatPeriod ()).isEqualTo (Duration .ofSeconds (5 ));
148
150
}
149
151
150
152
@ Test
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public void tearDown() {
68
68
69
69
@ Test
70
70
void shouldReportConcurrencyZeroPercentWhenGridIsStartedWithoutLoad () {
71
- driver .get (whereIs (server , "/ui#/sessions" ));
71
+ driver .get (whereIs (server , "/ui/ #/sessions" ));
72
72
73
73
WebElement concurrency =
74
74
wait .until (
@@ -79,7 +79,7 @@ void shouldReportConcurrencyZeroPercentWhenGridIsStartedWithoutLoad() {
79
79
80
80
@ Test
81
81
void shouldShowOneNodeRegistered () {
82
- driver .get (whereIs (server , "/ui" ));
82
+ driver .get (whereIs (server , "/ui/ " ));
83
83
84
84
List <WebElement > nodeInfoIcons =
85
85
wait .until (
@@ -93,7 +93,7 @@ void shouldIncrementSessionCountWhenSessionStarts() {
93
93
WebDriver remoteWebDriver =
94
94
new RemoteWebDriver (server .getUrl (), Browser .detect ().getCapabilities ());
95
95
try {
96
- driver .get (whereIs (server , "/ui#/sessions" ));
96
+ driver .get (whereIs (server , "/ui/ #/sessions" ));
97
97
98
98
wait .until (textToBe (By .cssSelector ("div[data-testid='session-count']" ), "1" ));
99
99
} finally {
You can’t perform that action at this time.
0 commit comments