Skip to content

Commit 01cac70

Browse files
committed
Update thread safety check in serving
Remove (overlap) check that there must be at least 1 thread at running during test Because if there is only 1 thread running, then the code is thread safe
1 parent 32d9de2 commit 01cac70

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

serving/src/test/java/feast/serving/util/EntityMapBuilderTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public void shouldBeThreadSafe() throws Exception {
138138
MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(nbThread));
139139
CountDownLatch latch = new CountDownLatch(1);
140140
AtomicBoolean running = new AtomicBoolean();
141-
AtomicInteger overlaps = new AtomicInteger();
142141

143142
EntityMapBuilder builder = new EntityMapBuilder();
144143
List<String> entityIds = createEntityIds(20);
@@ -165,9 +164,6 @@ public void shouldBeThreadSafe() throws Exception {
165164
} catch (InterruptedException e) {
166165
e.printStackTrace();
167166
}
168-
if (running.get()) {
169-
overlaps.incrementAndGet();
170-
}
171167
running.set(true);
172168
builder.addFeatureValueList(featureValueList.get(j));
173169
running.set(false);
@@ -181,7 +177,6 @@ public void shouldBeThreadSafe() throws Exception {
181177
all.get();
182178

183179
validate(builder.toEntityMap(), entityIds, featureIds, timestamp);
184-
assertThat(overlaps.get(), greaterThan(0));
185180
}
186181

187182
private void validate(

0 commit comments

Comments
 (0)