Warning: session_start(): open(/var/lib/php/sessions/sess_pcc0c8qip7s4gcj1l3hkuihdn5, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
import java.nio.file.*;
import static java.nio.file.StandardWatchEventKinds.*;
sbool testJDKWatchService() {
File dir = mkdirs(createTempDir());
final Path path = dir.toPath();
final WatchService watchService = FileSystems.getDefault().newWatchService();
final WatchKey watchKey = path.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY, OVERFLOW);
final Set changes = synchroSet();
thread {
//sleep(100);
try {
saveProgramTextFile("bla", "1");
Countdown countdown = fiveSeconds();
while (l(changes) < 2 && !countdown.done())
sleep(1);
} finally {
watchService.close();
}
}
final Countdown countdown = fiveSeconds();
expectException(ClosedWatchServiceException.class, r {
while (!countdown.done()) {
final WatchKey wk = watchService.take();
for (WatchEvent> event : wk.pollEvents()) pcall {
final Path changed = (Path) event.context();
print("Changed: " + changed + ", " + event.kind());
changes.add(changed.toFile().getName());
}
wk.reset();
}
});
pcall { watchService.close(); }
deleteDirectory(dir);
ret eq(changes, lithashset("bla", "bla_temp"));
}