polis-vk / 2023-nosql-lsm Goto Github PK
View Code? Open in Web Editor NEWNoSQL project @ ITMO/polis.vk.education
License: Apache License 2.0
NoSQL project @ ITMO/polis.vk.education
License: Apache License 2.0
Плавающий тест (иногда проходит, иногда валится).
Log
:
BasicConcurrentTest > testConcurrentRead_10_000(Dao) > [1] TestDao<
name_dao_implementation
> FAILED
java.util.concurrent.TimeoutException at TimeoutInvocation.java:70
Проблема неработающих тестов на windows (при выданных разрешениях) может быть связана со следующим:
Постпроцессинг тестов пытается удалить файл первого Dao, который еще используется вторым Dao, из-за чего вылетает исключение.
То есть второй объект Dao не создается через createDao(), в следствие чего не закрывается в конце теста.
Чтобы избежать такое поведение можно закрыть второй объект Dao, либо когда делаем reopen перезаписать поле делегата, а не создавать новый объект TestDao.
Пример с закрытием Dao (добавлен dao.close()):
void variability(Dao<String, Entry<String>> dao) throws IOException {
final Collection<Entry<String>> entries =
List.of(
entry("key1", "value1"),
entry("key10", "value10"),
entry("key1000", "value1000"));
entries.forEach(dao::upsert);
dao.close();
dao = DaoFactory.Factory.reopen(dao);
for (final Entry<String> entry : entries) {
assertSame(dao.get(entry.key()), entry);
}
dao.close();
}
Второй вариант - измененный reopen:
public TestDao<Data, E> reopen() throws IOException {
delegate = factory.createDao(config);
return this;
}
Похоже автообновление веток у кого-то работает, у кого-то нет.
Пример #131 .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.