Skip to content

Commit

Permalink
fix test comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalmishraa committed Sep 5, 2024
1 parent 6d39d28 commit 83796be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions apps/compiler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ redis.on('ready', () => {
const app = express();
app.use(express.json());

db.$connect()
.then(() => console.log('Connected to the database'))
.catch((error) => console.error('Database connection error:', error));



app.post('/submissions/batch', async (req, res) => {
try {
Expand Down
3 changes: 1 addition & 2 deletions apps/worker-compiler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,9 @@ async function runCommand(command: string, code: string, language: string, expec
return;
}

stdout = stdout.trimEnd();


if (expected_output !== stdout) {
if (expected_output !== stdout || expected_output + '\n' !== stdout) {
console.log(`expected_output: ${expected_output}, stdout: ${stdout}`);

resolve({
Expand Down

0 comments on commit 83796be

Please sign in to comment.